#include <cctype>
inline int readint()
{
char c = getchar();
int x = 0;
while(!isdigit(c))
c = getchar();
while(isdigit(c))
{
x = x * 10 + c - '0';
c = getchar();
}
return x;
}
int buf[10];
inline void writeint(int i)
{
int p = 0;
if(!i)
p++;
else while(i)
{
buf[p++] = i % 10;
i /= 10;
}
for(int j = p-1; j >= 0; j--)
putchar('0' + buf[j]);
inline int readint()
{
char c = getchar();
int x = 0;
while(!isdigit(c))
c = getchar();
while(isdigit(c))
{
x = x * 10 + c - '0';
c = getchar();
}
return x;
}
int buf[10];
inline void writeint(int i)
{
int p = 0;
if(!i)
p++;
else while(i)
{
buf[p++] = i % 10;
i /= 10;
}
for(int j = p-1; j >= 0; j--)
putchar('0' + buf[j]);
}
以上代码只能处理非负整数