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 |
Re:我的简洁JAVA答案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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator