|
|
back to boardjava, wrong answer Posted by Peter 24 Feb 2012 12:23 import java.util.ArrayList; import java.util.Scanner; public class SqrtBack{
public static void main(String[] args){ Scanner in = new Scanner(System.in); ArrayList<Integer> list = new ArrayList<Integer>(); for(int i=0; i<=args.length; i++){ list.add(in.nextInt()); } Integer ai[] = new Integer[list.size()]; ai = list.toArray(ai);
for(int j = ai.length-1; j >= 0; j--){
System.out.printf("%.4f\r\n", Math.sqrt(ai[j]));
}
} } i tested it its work fine, cant understand what is wrong Re: java, wrong answer Posted by Noob 25 Feb 2012 14:58 This is TIMUS! args variable is always empty Re: java, wrong answer Posted by Peter 27 Feb 2012 14:47 oh :P |
|
|