{"problem":{"name":"digitnum","description":{"content":"Given an integer $N$, solve the following problem. Let $f(x)=$ (The number of positive integers at most $x$ with the same number of digits as $x$).   Find $f(1)+f(2)+\\dots+f(N)$ modulo $998244353$.","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc238_c"},"statements":[{"statement_type":"Markdown","content":"Given an integer $N$, solve the following problem.\nLet $f(x)=$ (The number of positive integers at most $x$ with the same number of digits as $x$).  \nFind $f(1)+f(2)+\\dots+f(N)$ modulo $998244353$.\n\n## Constraints\n\n*   $N$ is an integer.\n*   $1 \\le N < 10^{18}$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc238_c","tags":[],"sample_group":[["16","73\n\n*   For a positive integer $x$ between $1$ and $9$, the positive integers at most $x$ with the same number of digits as $x$ are $1,2,\\dots,x$.\n    *   Thus, we have $f(1)=1,f(2)=2,...,f(9)=9$.\n*   For a positive integer $x$ between $10$ and $16$, the positive integers at most $x$ with the same number of digits as $x$ are $10,11,\\dots,x$.\n    *   Thus, we have $f(10)=1,f(11)=2,...,f(16)=7$.\n\nThe final answer is $73$."],["238","13870"],["999999999999999999","762062362\n\nBe sure to find the sum modulo $998244353$."]],"created_at":"2026-03-03 11:01:14"}}