Submission #19964

#TimeUsernameProblemLanguageResultExecution timeMemory
19964inspire12동전 (kriii4_E)C++98
0 / 100
0 ms1280 KiB
/* * 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...