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 |
为什么是WA?到底是那里错了?莫非是编译器和JAVA过不去?import java.math.BigDecimal; import java.util.Scanner; public class Main { double r=0; int n=0; public Main() { Scanner cin = new Scanner(System.in); while(cin.hasNext()){ r=cin.nextDouble(); n=cin.nextInt(); BigDecimal bigr=BigDecimal.valueOf(r); bigr=bigr.pow(n); String output=bigr.toPlainString(); if(output.startsWith("0")) output=output.substring(1); System.out.println(output); } } public static void main(String[] args) { Main m = new Main(); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator