問題一覧 > ネタ問題

No.8133 ‮Reversed‪

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 12
作問者 : KumaTachiRen
お気に入りにしたユーザー ProblemId : 11820 / 自分の提出
問題文最終更新日: 2026-04-01 22:22:36
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder April Fool Contest 2026 (順位表) の他の問題:

‮Problem Statement

‮ For a positive integer $x$, let ‪$‮\operatorname{rev}‪(‬x‪)‬$‬ be the value obtained by reversing the string that represents $x$ in decimal notation and interpreting the result in decimal again. For example, ‪$‮{\operatorname{rev}‪(‬5‪)‬=5,\operatorname{rev}‪(‬314‪)‬=413,\operatorname{rev}‪(‬1230‪)‬=321}$‬.

‮ Answer $N$ questions. The $i$-th question is as follows.

  • ‮ You are given positive integers ‪$‮{L{}_i,R{}_i\ ‪(‬L{}_i‪\leq‬R{}_i‪)‬}$‬. Find the sum of ‪$‮{\operatorname{rev}‪(‬x‪)‬}$‬ over all integers $x$ between ‪$‮{L{}_i}$‬ and ‪$‮{R{}_i}$‬, inclusive, modulo the prime ‪$‮7000000001$‬.

‮Input

$N$
$‮{L{}_1\ R{}_1}$
$‮{L{}_2\ R{}_2}$
$\ \vdots$
$‮{L{}_N\ R{}_N}$

  • $‮{1 ‪\leq‬ N ‪\leq‬ 10{}^5}$
  • $‮{1 ‪\leq‬ L{}_i ‪\leq‬ R{}_i ‪\leq‬ 10{}^1{}^8}$
  • ‮ ‪$‮{N, L{}_i, R{}_i}$ ‬ are all integers
  • ‮ The input and output contain nothing other than digits, spaces, and newlines

‮Output

‮ Print $N$ lines. On the $i$-th line, print the answer to the $i$-th question.

‮Sample

‮Sample 1
‮Input
‮4
‮20 26
‮96 103
‮5494 7575
‮3730 7782
‮Output
‮224
‮940
‮10406202
‮20260401

‮The answer to the first question is ‪$‮{2+12+22+32+42+52+62=224}$‬.

‮The answer to the second question is ‪$‮{69+79+89+99+1+101+201+301=940}$‬.

‮The input and output contain nothing other than digits, spaces, and newlines. In the samples as well, ignore any characters other than digits, spaces, and newlines.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。