2014年3月10日
摘要: 原题链接略坑的一道题。#include char str[1000];int f(int n){ int s = 0; while(n){ s += n % 10; n /= 10; } return s;}int main(){ int n, s; while(scanf("%s", str), str[0] - '0'){ s = 0; for(int i = 0; str[i] != '\0'; ++i) s += str[i] - '0'; while(s > 9) ... 阅读全文
posted @ 2014-03-10 22:32 长木Qiu 阅读(123) 评论(0) 推荐(0) 编辑