{"problem":{"name":"B. Riana and the Blind Date","description":{"content":"Last valentines, Riana went on a blind date with Zanoki-kun, a famous _shoujo manga mangaka_, but after a series of misunderstandings, she accidentally became one of his _manga_ assistants.  In his n","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10255B"},"statements":[{"statement_type":"Markdown","content":"Last valentines, Riana went on a blind date with Zanoki-kun, a famous _shoujo manga mangaka_, but after a series of misunderstandings, she accidentally became one of his _manga_ assistants. \n\nIn his new manga, _Biidoru wa Meido-sama!_ (_Class Beadle is Maid!_), he adopts a new system of expressing dates on a calendar. In this system, Zanoki-kun takes the numerical value of the month (January = $1$, February = $2$, March = $6$, ... , November = $11$, December = $12$), and appends the day to it. Thus, representing each date as a single integer. \n\nFor example:\n\nJanuary $1$ becomes $11$.\n\nFebruary $23$ becomes $223$.\n\nNovember $5$ becomes $115$.\n\nDecember $24$ becomes $1224$.\n\nIt just so happens that it takes Zanoki-kun $1$ pencil to draw the integer '$1$', $2$ pencils to draw the integer '$2$', and so on. Generally, it takes Zanoki-kun $n$ pencils to draw the integer '$n$'.\n\nIn chapter $1$ of _Biidoru wa Meido-sama!_, Zanoki-kun decides to draw all the dates from year *$A$* to year *$B$* inclusive. Zanoki-kun wants to prepare all the pencils he needs before he starts drawing, but he doesn't want to waste any more money than he has to, so he commissions his _manga_ assistants, including Riana, to compute the least number of pencils he needs to draw all the dates from year *$A$* to year *$B$* inclusive. Note that the date does not include the year.\n\nMore formally, let *$S$* be the least number of pencils Zanoki-kun needs in order to draw all the dates from year *$A$* and year *$B$* inclusive. Find *$S$* given *$A$* and *$B$*.\n\nNote that three criteria must be taken into account to identify leap years: \n\nTwo spaced integers *$A$* and *$B$*. The first integer, *$A$*, is the year that Zanoki-kun chooses to begin drawing at. The second integer, *$B$*, is the year that Zanoki-kun chooses to end drawing at.\n\nIt is guaranteed that *$A$* and *$B$* ranges from $0$ to $10^(18)$ inclusive. ($0 <= A <= B <= 10^(18)$)\n\nOutput the least number of pencils Zanoki-kun needs in order to draw all the dates from year *$A$* and year *$B$* inclusive. Since the answer can get quite large, output only the positive remainder when *$S$* is divided by $104206969$, Zanoki-kun's favorite a prime number.\n\n$11 + 12 + \\\\dots + 21 + 22 + \\\\dots + 31 + 32 + \\\\dots + 41 + 42 + \\\\dots + 51 + 52 + \\\\dots + 61 + 62 + \\\\dots$ $+ 71 + 72 + \\\\dots + 81 + 82 + \\\\dots + 91 + 92 + \\\\dots + 101 + 102 + \\\\dots + 111 + 112 + \\\\dots$ $+ 121 + 122 + \\\\dots + 11 + 12 + \\\\dots + 21 + 22 + \\\\dots + 31 + 32 + \\\\dots + 41 + 42 + \\\\dots + 51 + 52 + \\\\dots$ $+ 61 + 62 + \\\\dots + 71 + 72 + \\\\dots + 81 + 82 + \\\\dots + 91 + 92 + \\\\dots + 101 + 102 + \\\\dots + 111 + 112 + \\\\dots$ $+ 121 + 122 + \\\\dots + 11 + 12 + \\\\dots + 21 + 22 + \\\\dots + 31 + 32 + \\\\dots + 41 + 42 + \\\\dots + 51 + 52 + \\\\dots$ $+ 61 + 62 + \\\\dots + 71 + 72 + \\\\dots + 81 + 82 + \\\\dots + 91 + 92 + \\\\dots + 101 + 102 + \\\\dots$ $+ 111 + 112 + \\\\dots + 121 + 122 + \\\\dots + 1230 + 1231 = 542274$\n\n## Input\n\nTwo spaced integers *$A$* and *$B$*. The first integer, *$A$*, is the year that Zanoki-kun chooses to begin drawing at. The second integer, *$B$*, is the year that Zanoki-kun chooses to end drawing at.It is guaranteed that *$A$* and *$B$* ranges from $0$ to $10^(18)$ inclusive. ($0 <= A <= B <= 10^(18)$)\n\n## Output\n\nOutput the least number of pencils Zanoki-kun needs in order to draw all the dates from year *$A$* and year *$B$* inclusive. Since the answer can get quite large, output only the positive remainder when *$S$* is divided by $104206969$, Zanoki-kun's favorite a prime number.\n\n[samples]\n\n## Note\n\n$11 + 12 + \\\\dots + 21 + 22 + \\\\dots + 31 + 32 + \\\\dots + 41 + 42 + \\\\dots + 51 + 52 + \\\\dots + 61 + 62 + \\\\dots$ $+ 71 + 72 + \\\\dots + 81 + 82 + \\\\dots + 91 + 92 + \\\\dots + 101 + 102 + \\\\dots + 111 + 112 + \\\\dots$ $+ 121 + 122 + \\\\dots + 11 + 12 + \\\\dots + 21 + 22 + \\\\dots + 31 + 32 + \\\\dots + 41 + 42 + \\\\dots + 51 + 52 + \\\\dots$ $+ 61 + 62 + \\\\dots + 71 + 72 + \\\\dots + 81 + 82 + \\\\dots + 91 + 92 + \\\\dots + 101 + 102 + \\\\dots + 111 + 112 + \\\\dots$ $+ 121 + 122 + \\\\dots + 11 + 12 + \\\\dots + 21 + 22 + \\\\dots + 31 + 32 + \\\\dots + 41 + 42 + \\\\dots + 51 + 52 + \\\\dots$ $+ 61 + 62 + \\\\dots + 71 + 72 + \\\\dots + 81 + 82 + \\\\dots + 91 + 92 + \\\\dots + 101 + 102 + \\\\dots$ $+ 111 + 112 + \\\\dots + 121 + 122 + \\\\dots + 1230 + 1231 = 542274$","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ x, y \\in \\mathbb{Z}^+ $ be given such that $ 1 \\le x \\le y \\le 10^{12} $.  \nLet $ (p, q) \\in \\mathbb{Z}^+ \\times \\mathbb{Z}^+ $ be a *private key*.  \nThe corresponding *public key* is $ (\\gcd(p, q), \\operatorname{lcm}(p, q)) $.\n\n**Constraints**  \nGiven public key: $ \\gcd(p, q) = x $, $ \\operatorname{lcm}(p, q) = y $.\n\n**Objective**  \nCount the number of ordered pairs $ (p, q) $ such that:  \n$$\n\\gcd(p, q) = x \\quad \\text{and} \\quad \\operatorname{lcm}(p, q) = y\n$$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10255B","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}