Submission #15918

#TimeUsernameProblemLanguageResultExecution timeMemory
15918ggoh팩토리얼 세제곱들의 합 (YDX14_fact)C++98
0 / 1
0 ms1084 KiB
#include<cstdio> int a,b,x[]={1,2,4,1},y[]={1,2,6,2},z[]={1,2,1,6}; main() { scanf("%d%d",&a,&b); if(b==0) { a++; while(a%10==0)a/=10; printf("%d",a); } else if(b==1) { if(a>=4)printf("4"); else printf("%d",x[a]); } else if(b==2) { if(a>=4)printf("8"); else printf("%d",y[a]); } else { if(a>=4)printf("2"); else printf("%d",z[a]); } }
#Verdict Execution timeMemoryGrader output
Fetching results...