标签:bsp == div scan 完整 else color 判断 int
int Scan() { int res = 0, ch, flag = 0; 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; }
标签:bsp == div scan 完整 else color 判断 int
原文地址:https://www.cnblogs.com/mayouyou/p/8979803.html