[信息与未来 2015] 求回文数(加强版)

Luogu
IDLGB3883
Time1000ms
Memory128MB
DifficultyP4
2015江苏枚举数位 DP信息与未来
一个正整数,正读和反读都相同的数为回文数,例如 $22,131,2442,37073,6,\cdots$。所有的 $1$ 位数都是回文数。 现给出一个正整数 $n$,求出 $[1,n]$ 中的回文数的个数。 ## Input 一个整数 $n$。 ## Output 一个整数,即 $1\sim n$ 中全部回文数的个数,答案对 $20091119$ 取模。 [samples] ## Note ### 样例解释 在 $1$ 至 $24$ 中,回文数有 $1\sim 9,11,22$,共 $11$ 个。 ### 数据范围 $1\le n\le10^{100}$。
Samples
Input #1
24
Output #1
11
API Response (JSON)
{
  "problem": {
    "name": "[信息与未来 2015] 求回文数(加强版)",
    "description": {
      "content": "一个正整数,正读和反读都相同的数为回文数,例如 $22,131,2442,37073,6,\\cdots$。所有的 $1$ 位数都是回文数。 现给出一个正整数 $n$,求出 $[1,n]$ 中的回文数的个数。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 131072
    },
    "difficulty": {
      "LuoguStyle": "P4"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB3883"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "一个正整数,正读和反读都相同的数为回文数,例如 $22,131,2442,37073,6,\\cdots$。所有的 $1$ 位数都是回文数。\n\n现给出一个正整数 $n$,求出 $[1,n]$ 中的回文数的个数。\n\n## Input\n\n一个整数 $n$。\n\n## Output\n\n一个整数,即 $1\\sim n$ 中全部回文数的个数,答案对 $20091119$ 取模。\n\n[samples]\n\n## N...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments