【CodeForces】[656A]Da Vinci Powers

Problem Description

Loading...

Problem Analysis

As an April Fools’ Day special,
this problem seems to require finding the pattern from the WA data?

cpp
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#include<stdio.h>
#include<math.h>
int main() {
	int n;
	while(scanf("%d",&n)!=EOF) {
		if(n<13)
			printf("%.lf\n",pow(2,n));
		else
			printf("%.lf\n",pow(2,n)-pow(2,n-13)*100);
	}
	return 0;
}

Problem link: 【CodeForces】[656A]Da Vinci Powers

This post is licensed under CC BY-NC-SA 4.0. If it helped, or if you have anything to say, the comment box below is open.
Page views —
Unique visitors —

Loading...