Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

太水了吧,java一秒好了。

Posted by 13408100238 at 2015-05-11 21:46:05 on Problem 3982
import java.math.*;
import java.util.*;
import java.io.*;

public class Main
{

    public static void main(String[] args)
    {
    	Scanner cin=new Scanner(new BufferedInputStream(System.in));
    	BigInteger a,b,c;
    	while(cin.hasNext())
    	{
    		a=cin.nextBigInteger();
    		b=cin.nextBigInteger();
    		c=cin.nextBigInteger();
    		for(int i=1;i<=32;i++)
    		{
    			a=a.add(b).add(c);
    			b=a.add(b).add(c);
    			c=a.add(b).add(c);
    		}
    		System.out.println(a.add(b).add(c));
    	}
        cin.close();
    }
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator