HDU 1006 Digital Roots】的更多相关文章

Problem Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two or more digits, those digits a…
Digital Roots Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 79339    Accepted Submission(s): 24800 Problem Description The digital root of a positive integer is found by summing the digits of…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1013 Digital Roots Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 90108    Accepted Submission(s): 28027 Problem Description The digital root of a…
Digital Roots Problem Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two or more digits,…
Digital Roots Problem Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two or more digits,…
 /*Digital Roots Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 58506    Accepted Submission(s): 18275 Problem Description The digital root of a positive integer is found by summing the digi…
Digital Roots Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 79180    Accepted Submission(s): 24760 Problem Description The digital root of a positive integer is found by summing the digits of…
先上题目: Digital Roots Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 39890    Accepted Submission(s): 12286 Problem Description The digital root of a positive integer is found by summing the digi…
Problem Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two or more digits, those digits a…
#include <stdio.h> int main(void) { int m,i;char n[10000]; while(scanf("%s",&n)==1&&n[0]!='0') { for(m=i=0;n[i];i++) { m+=n[i]-'0'; } printf("%d\n",m%9==0?9:m%9); } return 0; }…