ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1001. Обратный корень

Why is there always COMPILATION ERROR? It was compiled successfully in my local IDE.
Послано TanyaLew 5 сен 2016 18:23
I have a hard time submitting my first piece of code. Compilation error appeared and I have no idea why. The following is my code.

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * Created by Tanya on 2016/9/5.
 */
public class ReverseRoot2
{
    Scanner in;
    PrintWriter out;
    public void work()throws Exception
    {
        List<Double> numlist = new ArrayList<Double>();
        in = new Scanner(System.in);
        String line = "";
        while(in.hasNextLine() && !(line = in.nextLine()).equals(""))
        {
            String[] strnums = line.split(" ");
            for(String strnum : strnums)
            {
                if(strnum.matches("[0-9]+\\.*[0-9]*"))
                {
                    numlist.add(Double.parseDouble(strnum));
                }
            }
        }
        out = new PrintWriter(System.out);
        int len = numlist.size();
        for(int i = len - 1;i>=0;i--)
        {
            out.print(Math.sqrt(numlist.get(i).doubleValue()) + "\t");
        }
        out.flush();
    }
    static public void main(String[] args)throws Exception
    {
        ReverseRoot2 rr = new ReverseRoot2();
        rr.work();
    }
}
Re: Why is there always COMPILATION ERROR? It was compiled successfully in my local IDE.
Послано Oleg Baskakov 5 сен 2016 20:19
After you submit your code, if it gets "compilation error", within the next 15 minutes it is underlined — you can click on it and see the error message.
Re: Why is there always COMPILATION ERROR? It was compiled successfully in my local IDE.
Послано ToadMonster 6 сен 2016 13:10
Facepalm.

Please see your attempts by link
http://acm.timus.ru/status.aspx?space=1&num=1001&author=211233

What language your program is? What language you submitted?