package com.shb.java; /** * 将数组中的0放到数组的后边,然后原来的非零数的顺序不改变 * @author BIN * */ public class Demo2{ public static void main(String[] args){ getArray(new int[]{1,0,0,5,0}); } public static int[] getArray(int[] array){ int cur = 0; for(int i=0;i<array.leng…
继续学习Java高精度,今天写的是求N!. 首先附上源代码: import java.util.Scanner; import java.math.BigInteger; public class Main { public static void main(String []args) { Scanner cin = new Scanner(System.in); BigInteger a,n,i; while(cin.hasNext()) { a = cin.nextBigInteger()…