标签:优化 etc putc return == getch har bsp code
int read() { char c;int ff=1; while((c=getchar())<‘0‘||c>‘9‘) if(c==‘-‘)ff=-1; int num=c-‘0‘; while((c=getchar())>=‘0‘&&c<=‘9‘) num=num*10+c-‘0‘; return ff*num; }
void write(int x) { if(x<0) { putchar(‘-‘); x=-x; } while(x>9)write(x/10); putchar(x%10+‘0‘); }
标签:优化 etc putc return == getch har bsp code
原文地址:https://www.cnblogs.com/ljy-endl/p/11290815.html