Home => ProblemSet => 100.100-06:阶乘
Problem1213--100.100-06:阶乘

1213: 100.100-06:阶乘

Time Limit: 1 Sec  Memory Limit: 128 MB  Submit: 4  Solved: 2
[ Submit ] [ Status ] [ Creator: ][ 参考程序 ]

Description

n的阶乘定义为n! = n * (n - 1) * (n - 2) * ... *1。
n的双阶乘定义为n!! = n * (n - 2) * (n - 4) * ... * 2或n!! = n * (n - 2) * (n - 4) * ... *1,取决于n的奇偶性。
但是阶乘的增长速度太快了,所以我们现在只想知道n!和n!!末尾的0的个数。

Input

一个正整数n, n ≤ 10^7

Output

两个整数, 分别为n!和n!!末尾0的个数。

Sample Input Copy

10

Sample Output Copy

2 1

HINT

样例二
输入 5
输出 1 0


样例一说明:
10! = 3628800, 10!! = 10 * 8 * 6 * 4 * 2 = 3840


样例二说明:
5! = 120, 5!! = 5 * 3 * 1 = 15

Source/Category