fork download
  1. R=range;A=lambda f:''.join([str(sum([j for j in R(1,i)if i/j%1==0]))for i in R(1,f+1)])[f-1]
  2. exec("print(A(int(input())));"*4)
Success #stdin #stdout 0.16s 9024KB
stdin
1
5
13
1000
stdout
0
1
3
2