| 比赛 | 防止浮躁的小练习v0.3 | 评测结果 | AAAAAAAAAT |
|---|---|---|---|
| 题目名称 | 无穷的序列 | 最终得分 | 90 |
| 用户昵称 | BillAlen | 运行时间 | 2.788 s |
| 代码语言 | C++ | 内存使用 | 0.31 MiB |
| 提交时间 | 2016-10-12 20:19:21 | ||
#include <iostream>
#include <fstream>
#include <cstdlib>
using namespace std;
int main(){
unsigned n;
fstream in("unlessseq.in", ios::in), out("unlessseq.out", ios::out);
in >> n;
for(int i = 0; i < n; ++i){
unsigned pos;
in >> pos;
--pos;
for(int j = 1; pos >= j; ++j) pos -= j;
out << (pos == 0 ? 1 : 0) << endl;
}
in.close();
out.close();
return 0;
}