标签:io ar c amp r res as har return
/* 仅适合纯数字输入输出 */ #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; }
标签:io ar c amp r res as har return
原文地址:http://blog.csdn.net/lyhvoyage/article/details/39780049