应该没有比这还要快的代码了吧
  • 板块P1001 A+B Problem
  • 楼主C417
  • 当前回复1
  • 已保存回复1
  • 发布时间2024/9/29 00:55
  • 上次更新2024/9/29 08:13:49
查看原帖
应该没有比这还要快的代码了吧
985272
C417楼主2024/9/29 00:55

这么简单我竟然还WA了一次 (违规紫衫)

#include<bits/stdc++.h>
using namespace std;
int qread(){
	int f=1, a=0;
	char ch;
	ch=getchar();
	for(; !isdigit(ch); ch=getchar())
		if(ch=='-')
			f=-1;
	for(; isdigit(ch); ch=getchar())
		a=a*10+ch-'0';
	return a*f;
}
void write(int x){
	if(x<0){
		putchar('-');
		x=-x;
	}
	if(x<10){
		putchar(x+'0');
		return ;
	}
	write(x/10);
	putchar(x%10+'0');
}
int main(){
	write(qread()+qread()); 
    return 0;
}
2024/9/29 00:55
加载中...