- public class Num
- {
- public static void main(String[] args)
- {
- System.out.println(a(10000));
- }
- public static int a(int Num)
- {
- int x = 0;
- for(int i = 1;i<Num+1;i++)
- {
- int count = 0;
- int a = i;
- while(i%5 == 0)
- { count++;
- i = i/5;
- }
- x+=count;
- i = a;
- }
- return x;
- }
- }
复制代码 |
|