# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15917 | ggoh | 팩토리얼 세제곱들의 합 (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 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)
{
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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |