ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

Why this code is showed wrong answer in problem 1001
Posted by nattapong 21 Feb 2009 10:42
I don't understand that my code below get wrong answer.It can show the correct answer.Anyone, please advise me.

import java.util.Scanner;


public class root {
    public static void main(String[]args){
        Scanner in = new Scanner(System.in);
        long a = in.nextLong();
        long b = in.nextLong();
        long c = in.nextLong();
        long d = in.nextLong();



        System.out.printf("%.4f \n",Math.sqrt(d));
        System.out.printf("%.4f \n",Math.sqrt(c));
        System.out.printf("%.4f \n",Math.sqrt(b));
        System.out.printf("%.4f \n",Math.sqrt(a));
    }

}