QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#48645 | #4184. Amusement Arcade | neko_nyaa# | WA | 3ms | 3580kb | C++20 | 371b | 2022-09-14 21:13:04 | 2022-09-14 21:13:06 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
ios::sync_with_stdio(0); cin.tie(0);
int n; cin >> n;
for (int i = 0; i < 60; i++) {
for (int j = 0; j < 60; j++) {
if ((1LL << i) + (1LL << j) + 1 == n) {
cout << (1LL << i)+1 << '\n';
return 0;
}
}
}
cout << "impossible\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 3ms
memory: 3564kb
input:
7
output:
3
result:
ok
Test #2:
score: 0
Accepted
time: 3ms
memory: 3436kb
input:
15
output:
impossible
result:
ok
Test #3:
score: 0
Accepted
time: 3ms
memory: 3504kb
input:
19
output:
3
result:
ok
Test #4:
score: 0
Accepted
time: 1ms
memory: 3580kb
input:
2049
output:
1025
result:
ok
Test #5:
score: 0
Accepted
time: 3ms
memory: 3544kb
input:
32769
output:
16385
result:
ok
Test #6:
score: 0
Accepted
time: 3ms
memory: 3492kb
input:
536870913
output:
268435457
result:
ok
Test #7:
score: 0
Accepted
time: 3ms
memory: 3572kb
input:
35184372088833
output:
17592186044417
result:
ok
Test #8:
score: 0
Accepted
time: 3ms
memory: 3496kb
input:
2251799813685249
output:
1125899906842625
result:
ok
Test #9:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
576460752303423489
output:
288230376151711745
result:
ok
Test #10:
score: 0
Accepted
time: 2ms
memory: 3500kb
input:
1027
output:
3
result:
ok
Test #11:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
2081
output:
33
result:
ok
Test #12:
score: 0
Accepted
time: 3ms
memory: 3500kb
input:
34393292801
output:
33554433
result:
ok
Test #13:
score: -100
Wrong Answer
time: 1ms
memory: 3504kb
input:
1
output:
impossible
result:
wrong output format Expected integer, but "impossible" found