话不多说,贴代码
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 }
2023-12-09 12:56:21
话不多说,贴代码
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 }
下一篇:HCIE LAB