Skip to content

Instantly share code, notes, and snippets.

@istar0me
Created October 15, 2018 06:41
Show Gist options
  • Save istar0me/badb7f8b39eefb6e0f158caba8130df1 to your computer and use it in GitHub Desktop.
Save istar0me/badb7f8b39eefb6e0f158caba8130df1 to your computer and use it in GitHub Desktop.
#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;
}
}
}
@blackstuend
Copy link

不錯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment