0%

Problem 820


Problem 820


Nth digit of Reciprocals

Let dn(x) be the nth decimal digit of the fractional part of x, or 0 if the fractional part has fewer than n digits.

For example:

  • d7(1)=d7(12)=d7(14)=d7(15)=0
  • d7(13)=3 since 13=0.3333333333
  • d7(16)=6 since 16=0.1666666666
  • d7(17)=1 since 17=0.1428571428

Let S(n)=k=1ndn(1k).

You are given:

  • S(7)=0+0+3+0+0+6+1=10
  • S(100)=418

Find S(107).


倒数的第N位数字

dn(x)x的小数点后第n位数字;若其小数部分不满n位则记为0

例如:

  • d7(1)=d7(12)=d7(14)=d7(15)=0
  • d7(13)=3,因为13=0.3333333333
  • d7(16)=6,因为16=0.1666666666
  • d7(17)=1,因为17=0.1428571428

S(n)=k=1ndn(1k)

已知:

  • S(7)=0+0+3+0+0+6+1=10
  • S(100)=418

S(107)


Gitalking ...