{"problem":{"name":"998244353 → 1000000007","description":{"content":"**This problem is output-only.** We have a programming language equipped with the following operations of unsigned 64-bit integers: addition, multiplication, and a modulo operation where the divisor i","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc148_f"},"statements":[{"statement_type":"Markdown","content":"**This problem is output-only.**\nWe have a programming language equipped with the following operations of unsigned 64-bit integers: addition, multiplication, and a modulo operation where the divisor is $998244353$.  \nWrite a program that performs multiplication modulo $1000000007$ in this language.\nMore formally, write a program that receives integers $a$ and $b$ between $0$ and $1000000006$ and computes $a \\times b \\bmod{1000000007}$ under the following **Specification** and **Format**.\n\n## Input\n\nThe input given from Standard Input is empty.\n\n## Format\n\nThe $1$\\-st line of the program contains an integer $N$ $(1 \\leq N \\leq 100)$ representing the number of instructions in the program.  \nThe $2$\\-nd through $(N + 1)$\\-th lines contain $N$ instructions. The instructions are executed one by one from top to bottom.  \nEach instruction is in one of the following three forms.\n\n*   `add x y z`\n    *   Assign $(y + z) \\bmod{2^{64}}$ to $x$, where $x$ is a variable, and each of $y$ and $z$ is a variable or an unsigned 64-bit integer.\n*   `mul x y z`\n    *   Assign $(y \\times z) \\bmod{2^{64}}$ to $x$, where $x$ is a variable, and each of $y$ and $z$ is a variable or an unsigned 64-bit integer.\n*   `rem x y`\n    *   Assign $y \\bmod{998244353}$ to $x$, where $x$ is a variable, and $y$ is a variable or an unsigned 64-bit integer.\n\n## Specification\n\nThe program can handle $26$ **variables** represented by uppercase English letters: $A, B, \\dots, Z$.  \nEach variable can hold an integer value between $0$ and $2^{64}-1$ (inclusive). Below, such a value is called **unsigned 64-bit integer**.  \nAt the start of the execution of the program, $A$ is assigned an integer $a$, $B$ is assigned an integer $b$, and the other variables are assigned $0$.  \nAt the end of the execution, $C$ must hold $a \\times b \\bmod{1000000007}$.\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc148_f","tags":[],"sample_group":[],"created_at":"2026-03-03 11:01:14"}}