QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#48644#4184. Amusement Arcadeneko_nyaa#WA 3ms3616kbC++20373b2022-09-14 21:07:202022-09-14 21:07:22

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-09-14 21:07:22]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3616kb
  • [2022-09-14 21:07:20]
  • 提交

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 = 1; i < 60; i++) {
		for (int j = i+1; 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: 2ms
memory: 3568kb

input:

7

output:

3

result:

ok 

Test #2:

score: 0
Accepted
time: 3ms
memory: 3568kb

input:

15

output:

impossible

result:

ok 

Test #3:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

19

output:

3

result:

ok 

Test #4:

score: -100
Wrong Answer
time: 3ms
memory: 3500kb

input:

2049

output:

impossible

result:

wrong output format Expected integer, but "impossible" found