输入输出优化
每天看看同学的程序还是有很多收获的,比如今天template
#include<bits/stdc++.h>
typedef long long ll;
ll n;
template<typename T> T read() {
T n(0), f(1);
char ch = getchar();
for( ;!isdigit(ch); ch = getchar()) if(ch == '-') f = -1;
for( ; isdigit(ch); ch = getchar()) n = n * 10 + ch - 48;
return n * f;
}
inline void write(ll re){
if(re < 0){
putchar('-');
re = -re;
}
if(re > 9) write(re/10);
putchar(re%10+'0');
}
int main(){
n = read<ll>();
write(n);
printf("\n");
return 0;
}