摘要: 1 #include 2 #include 3 int main() 4 { 5 char a[170]; 6 int i,j; 7 while(gets(a)&&strcmp(a,"2013")!=0) 8 { 9 i=0;10 while(a[i]!='\0')11 {12 if(a[i]==' ')13 {14 j=i;15 while(a[j]!='\0')16 ... 阅读全文
posted @ 2013-08-10 16:56 WangLC 阅读(167) 评论(0) 推荐(0)
摘要: 大数 题意描述:输入N组数据,计算每一个比该数大并且每位数字之和可被十整除的最小数字,例如202 2+0+2=4,10-4=6,所以208符合题意; 1:若最后一位数字加上补齐的数字之和依然不大于9,就比如202的例子可直接输出加上6的结果208; 2:若大于9则有分为两种情况(1)从第一位一直进到 阅读全文
posted @ 2013-08-10 16:39 WangLC 阅读(606) 评论(0) 推荐(0)
摘要: 题目描述The cows are having their first election after overthrowing the tyrannical Farmer John, and Bessie is one of N cows (1 ≤ N ≤ 50,000) running for President. Before the election actually happens, however, Bessie wants to determine who has the best chance of winning.The election consists of two rou 阅读全文
posted @ 2013-08-10 15:16 WangLC 阅读(273) 评论(0) 推荐(0)