|  | 
|  | 
| вернуться в форум | Some tests which will help during a program debug...(+) n=298421086421975
 21818
 11974
 11967
 11964
 11964
 11964
 11907
 11707
 
 n=120
 22
 53
 23
 22
 22
 22
 22
 22
 22
 22
 
 n=1000000000
 788888898
 900000001
 900000000
 900000000
 900000000
 900000000
 900000000
 900000000
 900000000
 900000000
 
 n=1595999
 887689
 1594800
 998800
 998800
 998800
 994800
 897800
 897800
 897800
 893800
 
 n=2009999
 1112889
 2204000
 1214000
 1204000
 1204000
 1204000
 1204000
 1204000
 1204000
 1204000
 
 n=123456789
 96021948
 130589849
 100589849
 96589849
 96089849
 96029849
 96022849
 96022049
 96021959
 96021949
 
 n=10000
 2893
 4001
 4000
 4000
 4000
 4000
 4000
 4000
 4000
 4000
 
 n=20000
 6893
 18000
 8001
 8000
 8000
 8000
 8000
 8000
 8000
 8000
 
 n=30000
 10893
 22000
 22000
 12001
 12000
 12000
 12000
 12000
 12000
 12000
 
 n=9999
 10893
 22000
 22000
 12001
 12000
 12000
 12000
 12000
 12000
 12000
Re: Some tests which will help during a program debug...(+) Thanks for the tests! I got AC :)But... I have some small correntions:
 1) N <= 1 000 000 000, so N = 2 984 210 864 is an impossible test
 2) for N = 9999 the right output is:
 2889
 4000
 4000
 4000
 4000
 4000
 4000
 4000
 4000
 4000
Re: Some tests which will help during a program debug...(+) Also this one is a good test:11
 1
 4
 1
 1
 1
 1
 1
 1
 1
 1
Re: Some tests which will help during a program debug...(+) Послано Mapu  31 окт 2019 18:51correct first test isn = 29842
 ans
 10864
 21975
 21818
 11974
 11967
 11964
 11964
 11964
 11907
 11707
 
 and n = 9999
 0 2889
 1 4000
 2 4000
 3 4000
 4 4000
 5 4000
 6 4000
 7 4000
 8 4000
 9 4000
 
 I deduced the formula, but in numbers with zeros it does not work((
 | 
 | 
|