You've successfully subscribed to ムえのBLOG
Great! Next, complete checkout for full access to ムえのBLOG
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.

快读快写文件模版(旧博搬运)

. 1 min read
#include <cstdio>
#include <iostream>
using namespace std;
int a;
int read(){
	int f=1,ans=0;
	char c=getchar();
	while (c<'0'||c>'9') f=(c=='-')?-1:1,c=getchar();
	while (c>='0'&&c<='9') ans=ans*10+c-'0',c=getchar();
	return ans*f;
}
void write(int b){
	int a=b;
	if (b<0) a=-a,putchar('-');
	if (a==0) return;
	write(a/10);
	putchar(a%10+'0');
}
int main(void){
	freopen("test.in","r",stdin);
	freopen("test.out","w",stdout);
	a=read();
	cerr<<a;
	write(a);
	fclose(stdin);
	fclose(stdout);
	return 0;
}


本站总访问量 正在加载今日诗词....