+0  
 
0
181
2
avatar

Find the number of 10-digit numbers, where the sum of the digits is divisible by 10

 

not 2000000 
 

 May 9, 2022
 #1
avatar
+1

Computer program:

 

for n = 1..9999999999

  if (sumofdigits(n) % 10 == 0) n++

 

Result: n = 2,400,000

 May 9, 2022
 #2
avatar
+1

z=10;a=matrix(11,z);
for(i,0,9,a[1][i]=1);
i=2;
loopi: j=0;
loopj: a[i][j]=sumfor(k,0,9,a[i-1][(j - k + z) % z]);
j++; if(j print 10^(i-1),"-",10^i-1,":", a[i][0] - a[i-1][0];
i++; if(i

10 - 99 : 9
100 - 999 : 90
1000 - 9999 : 900
10000 - 99999 : 90,00
100000 - 999999 : 90,000
1000000 - 9999999 : 900,000
10000000 - 99999999 : 9,000,000
100000000 - 999999999 : 90,000,000
1000000000 - 9999999999 : 900,000,000

It is the last line you want ==900,000,000 such numbers.

 May 9, 2022

4 Online Users

avatar
avatar
avatar
avatar