#include<stdio.h>
int GetFactorial(int n)
{
int i, Factorial;
Factorial=1;
for(i=1; i<=n; i++) Factorial*=i;
return Factorial;
}
int main()
{
int n;
scanf("%d", &n);
int Factorial=GetFactorial(n);
Factorial=Factorial*Factorial*Factorial;
for(;Factorial%10==0;Factorial/=10)
{
if(Factorial%10==0){}
else printf("%d", Factorial&10);
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct - wrong output format : Unexpected end of file - token expected |
2 |
Halted |
0 ms |
0 KB |
- |