poj-3982

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++高精度加法真头疼

posted @ 2021-09-27 20:58  爽爽子的秃头生活  阅读(29)  评论(0)    收藏  举报