Last active
August 29, 2015 14:03
-
-
Save YangKeao/8472b3225d0888173a93 to your computer and use it in GitHub Desktop.
输入输出
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<cstdio> | |
#include<ctype.h> | |
using namespace std; | |
inline int readint() | |
{ | |
char c=getchar(); | |
while(!isdigit(c))c=getchar(); | |
int x=0; | |
while(isdigit(c)) | |
{ | |
x=x*10+c-'0'; | |
c=getchar(); | |
} | |
return x; | |
} | |
int buf[10]; | |
inline void writeint(int x) | |
{ | |
int p=0; | |
if(x==0)p++; | |
else while(x) | |
{ | |
buf[p++]=x%10; | |
x/=10; | |
} | |
for(int i=p-1;i>=0;i--)putchar('0'+buf[i]); | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment