标题:复数幂
public class demo5 { public static void main(String[] args) { try { PrintStream ps = System.out; PrintStream prs = new PrintStream(new File("C:\\Users\\Laptop\\Desktop\\ans\\ans.txt")); System.setOut(prs); work(123456); System.setOut(ps); } catch (FileNotFoundException e) { e.printStackTrace(); } } private static void work(int n) { BigInteger x = BigInteger.valueOf(2); BigInteger y = BigInteger.valueOf(3); for (int i = 1; i < n; i++) { BigInteger tmp1 = x.multiply(BigInteger.valueOf(2)).subtract(y.multiply(BigInteger.valueOf(3))); BigInteger tmp2 = x.multiply(BigInteger.valueOf(3)).add(y