3, 2, 1, Go!

2016 2015 2014 4 3 2 1 \large { {2016 \, 2015 \, 2014 \ldots 4 \, 3 \, 2 \, 1} }

The above expression shows the concatenation of the first 2016 2016 positive integers written backwards.

Let L L and S S denote the number of digits and the sum of digits, respectively, of this large number. Compute 1 10 [ ( S L ) ( m o d 2016 ) ] . \dfrac1{10} \left[ (S-L) \pmod{2016} \right].


The answer is 99.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

a=2016

b=a

while a>1:

_ _a-=1

_ _b=str(b)+str(a)

L=len(str(b))

c=0

d=0

while c<L:

_ _d+=int(str(b)[c])

_ _c+=1

S=d

print 0.1*((S-L)%2016)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...