chore(i8n,learn): processed translations
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
15047f2d90
commit
e5c44a3ae5
@ -1,32 +1,32 @@
|
||||
---
|
||||
id: 5900f4091000cf542c50ff1b
|
||||
title: 问题156:计数数字
|
||||
title: 'Problem 156: Counting Digits'
|
||||
challengeType: 5
|
||||
videoUrl: ''
|
||||
forumTopicId: 301787
|
||||
dashedName: problem-156-counting-digits
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
从零开始,自然数字在基数10中写下,如下所示:
|
||||
Starting from zero the natural numbers are written down in base 10 like this:
|
||||
|
||||
0 1 2 3 4 5 6 7 8 9 10 11 12 ....
|
||||
0 1 2 3 4 5 6 7 8 9 10 11 12....
|
||||
|
||||
考虑数字d = 1。在我们写下每个数字n后,我们将更新已发生的数字并将此数字称为f(n,1)。那么f(n,1)的第一个值如下:
|
||||
Consider the digit d=1. After we write down each number n, we will update the number of ones that have occurred and call this number f(n,1). The first values for f(n,1), then, are as follows:
|
||||
|
||||
nf(n,1)00 11 21 31 41 51 61 71 81 91 102 114 125
|
||||
nf(n,1) 00 11 21 31 41 51 61 71 81 91 102 114 125
|
||||
|
||||
请注意,f(n,1)永远不等于3。
|
||||
Note that f(n,1) never equals 3.
|
||||
|
||||
因此,等式f(n,1)= n的前两个解是n = 0并且n = 1。下一个解决方案是n = 199981。以相同的方式,函数f(n,d)给出在写入数字n之后已经写下的总位数d。
|
||||
So the first two solutions of the equation f(n,1)=n are n=0 and n=1. The next solution is n=199981. In the same manner the function f(n,d) gives the total number of digits d that have been written down after the number n has been written.
|
||||
|
||||
实际上,对于每个数字d≠0,0是方程f(n,d)= n的第一个解。设s(d)是f(n,d)= n的所有解的总和。
|
||||
In fact, for every digit d ≠ 0, 0 is the first solution of the equation f(n,d)=n. Let s(d) be the sum of all the solutions for which f(n,d)=n.
|
||||
|
||||
你得到s(1)= 22786974071。找到Σs(d)的1≤d≤9。注意:如果对于某些n,对于多于一个d的值,f(n,d)= n,对于d的每个值,再次计算n的这个值。 F(N,d)= N。
|
||||
You are given that s(1)=22786974071. Find ∑ s(d) for 1 ≤ d ≤ 9. Note: if, for some n, f(n,d)=n for more than one value of d this value of n is counted again for every value of d for which f(n,d)=n.
|
||||
|
||||
# --hints--
|
||||
|
||||
`euler156`应该返回21295121502550。
|
||||
`euler156()` should return 21295121502550.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler156(), 21295121502550);
|
||||
|
Reference in New Issue
Block a user