代码如下👇
#include <cstdio>
#include <iostream>
using namespace std;
inline int read()
{
char ch;
int x=0;int sign=1;
do{
ch=getchar();
if(ch=='-') sign=-1;
}while(ch>'9'||ch<'0');
while('0'<=ch&&ch<='9'){
x=x*10+(ch-'0');
ch=getchar();
}
return x*sign;
}
template <typename T>
inline T read_Tp(T& x)
{
char ch;x=0;
int sign=1;
do{
ch=getchar();
if(ch=='-') sign=-1;
}while(ch>'9'||ch<'0');
while('0'<=ch&&ch<='9'){
x=x*10+(ch-'0');
ch=getchar();
}
x*=sign;
}
int main()
{
int a;
a=read_Tp(a);
cout<<a<<endl;
}