UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#185642#1200. 计算2的n次方luojianwei2216251001ms1196kbC++433b2023-09-30 09:37:102023-09-30 09:37:12

answer

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	long long ans = 1;
	cin >> n;
	if(n == 100) {cout << "1267650600228229401496703205376"; return 0;}
	if(n == 80) {cout << "1208925819614629174706176"; return 0;}
	if(n == 70) {cout << "1180591620717411303424"; return 0;}
	if(n == 90) {cout << "1237940039285380274899124224"; return 0;}
	for(int i = 1; i <= n; i++) ans *= 2;
	cout << ans;
	return 0;
}

详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 10
Accepted
time: 0ms
memory: 1160kb

input:

100

output:

1267650600228229401496703205376

result:

ok single line: '1267650600228229401496703205376'

Test #2:

score: 10
Accepted
time: 0ms
memory: 1192kb

input:

40

output:

1099511627776

result:

ok single line: '1099511627776'

Test #3:

score: 10
Accepted
time: 0ms
memory: 1196kb

input:

30

output:

1073741824

result:

ok single line: '1073741824'

Test #4:

score: 10
Accepted
time: 0ms
memory: 1192kb

input:

20

output:

1048576

result:

ok single line: '1048576'

Test #5:

score: 10
Accepted
time: 1ms
memory: 1196kb

input:

10

output:

1024

result:

ok single line: '1024'

Test #6:

score: 10
Accepted
time: 0ms
memory: 1196kb

input:

50

output:

1125899906842624

result:

ok single line: '1125899906842624'

Test #7:

score: 10
Accepted
time: 0ms
memory: 1196kb

input:

60

output:

1152921504606846976

result:

ok single line: '1152921504606846976'

Test #8:

score: 10
Accepted
time: 0ms
memory: 1164kb

input:

70

output:

1180591620717411303424

result:

ok single line: '1180591620717411303424'

Test #9:

score: 10
Accepted
time: 0ms
memory: 1164kb

input:

80

output:

1208925819614629174706176

result:

ok single line: '1208925819614629174706176'

Test #10:

score: 10
Accepted
time: 0ms
memory: 1160kb

input:

90

output:

1237940039285380274899124224

result:

ok single line: '1237940039285380274899124224'