QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#48642#4184. Amusement Arcadeneko_nyaa#WA 3ms3660kbC++20373b2022-09-14 21:06:202022-09-14 21:06:21

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:06:21]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3660kb
  • [2022-09-14 21:06: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 = 0; 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: 3ms
memory: 3544kb

input:

7

output:

3

result:

ok 

Test #2:

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

input:

15

output:

impossible

result:

ok 

Test #3:

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

input:

19

output:

3

result:

ok 

Test #4:

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

input:

2049

output:

impossible

result:

wrong output format Expected integer, but "impossible" found