1000!末尾0 的个数
package addtest;
public class SumZero {
SumZero(){
  max = 1000;//默认值是1000
}
private int max;
/**
  * 得到max的因子 m 的个数
  */
public int getFactor(int m){
  int count = 0, n = max;
  //try 中的便是程序的核心
  try{
  while(n%m == 0){//能被m整除则count++
  count++;
  if(n >= m){
    n /= m;
  }
  }
  }
  catch(Exception e){
  e.printStackTrace();
  }
  return count;   
} 
/**
  * 得到末尾0的个数
  */
public int getNumber(){
  int count_2 = 0,//因子2的个数
    count_5 = 0;//因子5的个数
  for(int i = 1;i<=max;i++){
  //count_2 += getFactor(i);//其实没有必要求因子2的个数
  count_5 += getFactor(i);
  }
  return Math.min(count_2,count_5);//必定有:count_5 < count_2
}
public static void main(String[] args){
  System.out.println("1*2*...*1000的末尾有"
                        +new SumZero().getNumber()
                        +"个0");
}
}
请问这段代码 为什么不能运行
              
------解决方案--------------------死循环 怎么会有结果呢