Created
October 15, 2018 06:41
-
-
Save istar0me/badb7f8b39eefb6e0f158caba8130df1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) { | |
int n, i, times, sum; | |
while(scanf("%d", &n) != EOF) { | |
// int sum = 0; | |
while(n <= 2000000000) { | |
int sum = 0; | |
while(n >= 10) { | |
sum += n % 10; | |
n = n / 10; | |
} | |
sum = 0; | |
} | |
else if(n == 0) { | |
print("%d", sum); | |
return 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
不錯