ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#171348 | #975. 吉祥物 | heyuzhen | 100 | 0ms | 1164kb | C++ | 415b | 2023-06-22 21:51:11 | 2023-06-22 21:51:13 |
answer
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define dou double
ll n,t,now,sum;
int main(){
// freopen("data01.txt","r",stdin);
cin >> t;
while(t--){
cin >> n;
now = sum = 0;
for(ll i = 1;i <= n;i++){
sum += i;
if(sum >= n){
sum -= i;
now = i;
break;
}
}
n -= sum;
if(n == 1)cout << "1\n";
else cout << "0\n";
}
return 0;
}
详细
小提示:点击横条可展开更详细的信息
Test #1:
score: 20
Accepted
time: 0ms
memory: 1164kb
input:
852 17 61 95 39 89 92 83 70 83 99 15 25 47 34 36 27 37 74 81 91 21 35 17 62 95 87 91 47 28 33 63 25 ...
output:
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 ...
result:
ok 852 lines
Test #2:
score: 20
Accepted
time: 0ms
memory: 1160kb
input:
829 4 82 23 86 41 1 40 44 72 85 33 40 8 88 79 2 20 63 38 41 61 16 41 55 22 24 82 52 48 54 78 56 1 85...
output:
1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 ...
result:
ok 829 lines
Test #3:
score: 20
Accepted
time: 0ms
memory: 1160kb
input:
234 65 22 38 44 83 63 38 87 21 19 55 39 7 14 8 97 4 11 99 19 15 80 55 85 70 1 42 19 71 57 22 31 37 4...
output:
0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 234 lines
Test #4:
score: 20
Accepted
time: 0ms
memory: 1164kb
input:
374 12 66 94 2 62 99 81 51 56 87 50 44 34 54 32 86 90 29 53 36 37 1 42 84 22 77 31 81 66 49 71 61 62...
output:
0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 ...
result:
ok 374 lines
Test #5:
score: 20
Accepted
time: 0ms
memory: 1160kb
input:
305 7 62 33 58 78 65 6 86 55 15 77 7 7 77 91 95 25 41 28 41 9 75 50 92 48 41 10 27 62 85 12 48 39 95...
output:
1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 1 0 ...
result:
ok 305 lines