摘要: 5.2.1 小学生算术 http://poj.grids.cn/practice/2562/View Code 1 # include <stdio.h> 2 3 int main () { 4 5 int a, b; 6 while (scanf("%d %d", &a, &b) == 2) { 7 if (!a && !b) break; 8 int c = 0, ans = 0; 9 for (int i = 9; i>=0; i--) {10 c = (a%10 + b%10 + c) >9 ... 阅读全文
posted @ 2013-01-09 18:04 -六月飞雪- 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 5.1.1 WRTYU http://poj.grids.cn/practice/2538/View Code 1 # include <stdio.h> 2 3 char *s = "`1234567890-=QWERTYUIOP[]\ASDFGHJKL;'ZXCVBNM,./"; 4 5 int main () { 6 7 char c; 8 while ((c = getchar()) != EOF) { 9 int i;10 for (i = 1; s[i] && s[i]!=c; ++i);11 if (s[i... 阅读全文
posted @ 2013-01-09 17:16 -六月飞雪- 阅读(235) 评论(0) 推荐(0) 编辑