Moderator: Board moderators
if (N-m%9==0)
have two answers
else
only one
18
19
20
27
36
345
345
234
23
10000
1000000000000000000
10
80
90
6756756756
3423452353452
53252353225345243
465756865455532
5475665432
56765432478
900
7888
5677
34777
2390
45690
56790
19 20
21
22
29 30
39 40
383
383
259 260
26
11111
1111111111111111111
11
89
99 100
7507507507
3803835948279 3803835948280
59169281361494714
517507628283924
6084072702
63072702753
999 1000
8764
6308
38641
2656
50767
63099 63100


#include<stdio.h>
int main()
{
unsigned long long int a,b,c,d,n,f,count;
while(scanf("%llu",&n) && n)
{
a = n;
b = n/10;
count = 0;
while(1)
{
c = a+b;
d = c - (c/10);
if(d == n)
{
if(!count)
{
printf("%llu",c);
count ++;
}
else
printf(" %llu",c);
}
else if(d>n) break;
b++;
}
printf("\n");
}
return 0;
}4545544554
5050605059 5050605060

Users browsing this forum: No registered users and 1 guest