Submission #13633

#TimeUsernameProblemLanguageResultExecution timeMemory
13633baneling100팩토리얼 세제곱들의 합 (YDX14_fact)C++98
1 / 1
0 ms1084 KiB
#include <stdio.h> int N, K, Table[4][5]={{},{0,2,4,1,4},{0,2,6,2,8},{0,2,1,6,5}}; int main(void) { scanf("%d %d",&N,&K); if(K) { if(N>4) N=4; printf("%d",Table[K][N]); } else { N++; while(!(N%10)) N/=10; N%=10; printf("%d",N); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...