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

Re:我的简洁JAVA答案

Posted by cuihailong at 2011-01-14 11:06:47 on Problem 1001
In Reply To:我的简洁JAVA答案 Posted by:leiliang_2013 at 2010-10-28 10:24:48
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		String res = cin.nextBigDecimal().pow(cin.nextInt())
				.stripTrailingZeros().toPlainString();
		if (res.startsWith("0.")) {
			res = res.substring(1);
		}
		System.out.println(res);
	}
}

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