# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
7629 | gs13068 | 팩토리얼 세제곱들의 합 (YDX14_fact) | C++98 | 0 ms | 1088 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 a[4][5]={{0,0,0,0,0},{1,2,4,1,4},{1,2,6,2,8},{1,2,1,6,5}};
int main()
{
int i,n,m;
scanf("%d%d",&n,&m);
if(m==0)
{
while((n+1)%10==0)n/=10;
printf("%d",(n+1)%10);
}
else
{
if(n>4)n=4;
printf("%d",a[m][n]);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |