标签:
/* 只为纯数字输入和输出 */ #include <cstdio> int Scan() { //输入插头 int res = 0, flag = 0; char ch; if((ch = getchar()) == '-') flag = 1; else if(ch >= '0' && ch <= '9') res = ch - '0'; while((ch = getchar()) >= '0' && ch <= '9') res = res * 10 + (ch - '0'); return flag ? -res : res; } void Out(int a) { //输出外挂 if(a < 0) { putchar('-'); a = -a; } if(a >= 10) Out(a / 10); putchar(a % 10 + '0'); } int main() { int T, n; scanf("%d", &T); while(T--) { n = Scan(); Out(n); printf("\n"); } return 0; }
版权声明:本文博客原创文章。博客,未经同意,不得转载。
标签:
原文地址:http://www.cnblogs.com/gcczhongduan/p/4618359.html