标签:
Time Limit: 1000MS | Memory Limit: 65536K | |
Total Submissions: 7191 | Accepted: 3243 |
Description
Input
Output
Sample Input
1 1 1
Sample Output
69087442470169316923566147
java水过。。。
//poj3982 import java.util.*; import java.io.*; import java.math.*; public class Main { public static void main(String[] args){ Scanner in=new Scanner(System.in); BigInteger x,y,z,w; while(in.hasNext()){ x=in.nextBigInteger(); y=in.nextBigInteger(); z=in.nextBigInteger(); w=new BigInteger("0"); for(int i=3;i<=99;i++){ w=new BigInteger("0"); w=w.add(x); w=w.add(y); w=w.add(z); x=y;y=z;z=w; } System.out.println(w.toString()); } } }
标签:
原文地址:http://www.cnblogs.com/--560/p/4340854.html