话不多说,贴代码
1 int read()
2 {
3 int ret=0;
4 char c=getchar();
5 while (c<'0' || c>'9'){
6 c=getchar();
7 }
8 while (c>='0'&&c<='9'){
9 ret=(ret<<1)+(ret<<3)+c-'0';
10 c=getchar();
11 }
12 return ret;
13 }
标签:更好,int,ret,char,read,while,快读,排名,getchar
来源: https://www.cnblogs.com/Wag-Ho/p/15151864.html