c++ 快速读入
2020-12-13 16:40
标签:getch bsp etc == div code return tchar col 调用如下 c++ 快速读入 标签:getch bsp etc == div code return tchar col 原文地址:https://www.cnblogs.com/wzy-sky/p/11621302.html 1 inline read()
2 {
3 int s = 0, w = 1;
4 char ch = getchar();
5 while (ch ‘0‘ || ch > ‘9‘) {
6 if (ch == ‘-‘) w = -1;
7 ch = getchar();
8 while (ch >= ‘0‘ && ch ‘9‘) {
9 s = s 3 + s 1 + ch - ‘0‘;
10 ch = getchar();
11 }
12 return s * w;
13 }
int main()
{
int a, b;
a = read(), b = read();
}
上一篇:浅析C++预处理命令
下一篇:java基础(5)---内存分配