import java.math.BigInteger; import java.util.Scanner; public class gaojingdujiafa { public static void main(String[] args) { BigInteger []d = new BigInteger[200]; Scanner sc = new Scanner(System.in); while(sc.hasNext()) { d[0] = sc.nextBigInteger(); d[1] = sc.nextBigInteger(); d[2] = sc.nextBigInteger(); for(int i = 3 ; i < 100; i++) { d[i] = d[i-1].add(d[i-2]).add(d[i-3]); } System.out.println(d[99]); } } }
偷懒了偷懒了
c++高精度加法真头疼
原文:https://www.cnblogs.com/shuangshuangzi/p/15345232.html