{"problem":{"name":"ABC-DEF","description":{"content":"There are non-negative integers $A$, $B$, $C$, $D$, $E$, and $F$, which satisfy $A\\times B\\times C\\geq D\\times E\\times F$.   Find the remainder when $(A\\times B\\times C)-(D\\times E\\times F)$ is divide","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc275_b"},"statements":[{"statement_type":"Markdown","content":"There are non-negative integers $A$, $B$, $C$, $D$, $E$, and $F$, which satisfy $A\\times B\\times C\\geq D\\times E\\times F$.  \nFind the remainder when $(A\\times B\\times C)-(D\\times E\\times F)$ is divided by $998244353$.\n\n## Constraints\n\n*   $0\\leq A,B,C,D,E,F\\leq 10^{18}$\n*   $A\\times B\\times C\\geq D\\times E\\times F$\n*   $A$, $B$, $C$, $D$, $E$, and $F$ are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$A$ $B$ $C$ $D$ $E$ $F$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc275_b","tags":[],"sample_group":[["2 3 5 1 2 4","22\n\nSince $A\\times B\\times C=2\\times 3\\times 5=30$ and $D\\times E\\times F=1\\times 2\\times 4=8$,  \nwe have $(A\\times B\\times C)-(D\\times E\\times F)=22$. Divide this by $998244353$ and print the remainder, which is $22$."],["1 1 1000000000 0 0 0","1755647\n\nSince $A\\times B\\times C=1000000000$ and $D\\times E\\times F=0$,  \nwe have $(A\\times B\\times C)-(D\\times E\\times F)=1000000000$. Divide this by $998244353$ and print the remainder, which is $1755647$."],["1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000","0\n\nWe have $(A\\times B\\times C)-(D\\times E\\times F)=0$. Divide this by $998244353$ and print the remainder, which is $0$."]],"created_at":"2026-03-03 11:01:14"}}