Σ[k=0..10^100]floor(X/10^k)

AtCoder
IDabc233_e
Time2000ms
Memory256MB
Difficulty
Find $\displaystyle \sum_{k=0}^{10^{100}} \left \lfloor \frac{X}{10^k} \right \rfloor$. ## Constraints * $X$ is an integer. * $1 \le X < 10^{500000}$ ## Input Input is given from Standard Input in the following format: $X$ [samples] ## Notes $\lfloor A \rfloor$ denotes the value of $A$ truncated to an integer.
Samples
Input #1
1225
Output #1
1360

The value we seek is $1225+122+12+1+0+0+\dots+0=1360$.
Input #2
99999
Output #2
111105

Beware of carries.
Input #3
314159265358979323846264338327950288419716939937510
Output #3
349065850398865915384738153697722542688574377708317

The values in input and output can both be enormous.
API Response (JSON)
{
  "problem": {
    "name": "Σ[k=0..10^100]floor(X/10^k)",
    "description": {
      "content": "Find $\\displaystyle \\sum_{k=0}^{10^{100}} \\left \\lfloor \\frac{X}{10^k} \\right \\rfloor$.",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc233_e"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Find $\\displaystyle \\sum_{k=0}^{10^{100}} \\left \\lfloor \\frac{X}{10^k} \\right \\rfloor$.\n\n## Constraints\n\n*   $X$ is an integer.\n*   $1 \\le X < 10^{500000}$\n\n## Input\n\nInput is given from Standard Inpu...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments