社区讨论
NOIP输出格式
灌水区参与者 6已保存回复 12
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 12 条
- 当前快照
- 1 份
- 快照标识符
- @lobd5y6i
- 此快照首次捕获于
- 2023/10/29 19:04 2 年前
- 此快照最后确认于
- 2023/11/04 00:46 2 年前
CPP
#include<bits/stdc++.h>
using namespace std;
inline int read(){
int x=0,f=1;
char ch=getchar();
while(ch<'0'||ch>'9'){
if(ch=='-')
f=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9'){
x=(x<<1)+(x<<3)+(ch^48);
ch=getchar();
}
return x*f;
}
inline void print(int x){
if(x<0)putchar('-'),x=-x;
if(x>9)print(x/10);
putchar(x%10^48);
}
int n;
int main(){
freopen("1.in","r","stdin");
freopen("1.out","w","stdout");
n=read();
print(n),puts("");
return 0;
}
本人喜欢用上面那种的输入输出,可否在 NOIP 中使用,主要是想问
print()+puts("") 的,因为考场上的代码似乎要清空什么什么的 fclose 之类的回复
共 12 条回复,欢迎继续交流。
正在加载回复...