public static void main(String[] args) { BigInteger bir = new BigInteger("1"); for(int i=1;i<=1000;i++) { bir= bir.multiply(new BigInteger(String.valueOf(i))); } String s=bir.toString(); System.out.println(s); int count=0; for (int i = 0; i < s.length(); i++) { if(s.charAt(i)=='0') count++; } System.out.println("共有"+count+"个0");
|