Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
太水了吧,java一秒好了。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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator