Submission #19964

# Submission time Handle Problem Language Result Execution time Memory
19964 2016-02-25T07:54:02 Z inspire12 동전 (kriii4_E) C++
0 / 100
0 ms 1280 KB
/*
 * coin.cpp
 *
 *  Created on: 2016. 2. 25.
 *      Author: SeoYoungHak
 */

#include <stdio.h>
#include <math.h>
int ans;
int coin(int n){
	if(n<=2){
		return 1;
	}
	if(n==6){
		return 14;
	}
	if(n==7){
		return 24;
	}
	/*for(int i=0; i<n;i++)
	{
		if(i%2){
			//홀수
			ans++;
		}else{
			ans++;
		}
	}*/
	return pow(2,n-2);
}
int main()
{
	int n;
	scanf("%d",&n);
	printf("%d",coin(n));
}


# Verdict Execution time Memory Grader output
1 Correct 0 ms 1280 KB Output is correct
2 Correct 0 ms 1280 KB Output is correct
3 Correct 0 ms 1280 KB Output is correct
4 Correct 0 ms 1280 KB Output is correct
5 Correct 0 ms 1280 KB Output is correct
6 Correct 0 ms 1280 KB Output is correct
7 Correct 0 ms 1280 KB Output is correct
8 Incorrect 0 ms 1280 KB Output isn't correct
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -