This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/*
* 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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |