# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15936 | jihoon | 팩토리얼 세제곱들의 합 (YDX14_fact) | C++98 | 0 ms | 1084 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<cstdio>
int main(){
int n,k;
scanf("%d %d",&n,&k);
if(k==0){
int dap=n+1;
while(dap%10==0){
dap/=10;
}
printf("%d",dap%10);
}else if(k==1){
if(n==1) printf("2");
else if(n==2) printf("4");
else if(n==3) printf("1");
else printf("4");
}else if(k==2){
if(n==1) printf("2");
else if(n==2) printf("6");
else if(n==3) printf("2");
else printf("8");
}else{
if(n==1) printf("2");
else if(n==2) printf("1");
else if(n==3) printf("6");
else printf("5");
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |