rt,本人一直用的
inline void write(int x) { if(x<0) putchar('-'),x=-x; if(x>9) write(x/10); putchar(x%10^48); return; }
但是递归常数太大,容易爆炸,所以求一个普通的不用递归的,悬关。