|
|
вернуться в форумjava, wrong answer Послано Peter 24 фев 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 Послано Noob 25 фев 2012 14:58 This is TIMUS! args variable is always empty Re: java, wrong answer Послано Peter 27 фев 2012 14:47 oh :P |
|
|