标签:
int read(){ int sum=0; char ch=getchar(),last=‘ ‘; while (ch<‘0‘||ch>‘9‘){ last=ch;ch=getchar(); } while (ch>=‘0‘&&ch<=‘9‘){ sum=sum*10+ch-‘0‘; ch=getchar(); } if (last==‘-‘) sum*=-1; return sum; }
标签:
原文地址:http://www.cnblogs.com/Absolute-Zero/p/5879535.html