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

Почему не принимает решение, хотя в eclipce всё правильно работает
Posted by Danila 1 Oct 2014 19:59
import java.util.Scanner;
public class ObratniyKoren {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub


        int i;
        int n;
        Scanner scan=new Scanner(System.in);
        n=scan.nextInt();
        long []a=new long[n];
        for(i=1; i<n; i++)
        {
            a[ i]=scan.nextInt();
        }
        System.out.println("выводим массив наоборот");
for(i=n-1; i>0; i--)
{
    System.out.println((double)Math.sqrt(a[i]));

    }
    }

}
Re: Почему не принимает решение, хотя в eclipce всё правильно работает
Did you try to read FAQ?

"The program must print only the data that is required by the problem statement. The program must not print any prompts (“Enter N:”). The program must not wait for pressing a key at the end of execution."

Read the f...ing manuals before starting to use any service, including this one.
Re: Почему не принимает решение, хотя в eclipce всё правильно работает
Posted by TwoEightNine [SSAU4Life] 6 Oct 2014 00:13
goddamn lol :D