快读
inline int read()
{
int f = 1, x = 0;
char c = getchar();
while(c < '0' || c > '9')
{
if(c == '-') f = -1;
c = getchar();
}
while(c >= '0' && c <= '9')
{
x = x * 10 + c - '0';
c = getchar();
}
return f * x;
}
快写
inline void print(int x)
{
if(x < 0) x = -x, putchar('-');
if(x > 9) print(x / 10);
putchar(x % 10 + '0');
}
测试
main
#include <cstdio>
using namespace std;
inline int read()
{
int f = 1, x = 0;
char c = getchar();
while(c < '0' || c > '9')
{
if(c == '-') f = -1;
c = getchar();
}
while(c >= '0' && c <= '9')
{
x = x * 10 + c - '0';
c = getchar();
}
return f * x;
}
inline void print(int x)
{
if(x < 0) x = -x, putchar('-');
if(x > 9) print(x / 10);
putchar(x % 10 + '0');
}
int main()
{
int k = read();
print(k);
return 0;
}