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

Общий форум

в компиляторе работает, а тут runtime error
Послано Radian 15 мар 2016 05:57
В компиляторе работает а тут пишет ошибку.

import java.util.*;
import java.math.*;
import java.io.*;
public class koren
{
   public static void main(String[] args)
   {

          Scanner in = new Scanner(System.in);
          PrintWriter out = new PrintWriter(System.out);

          int a = in.nextInt();
          int b = in.nextInt();
          int c = in.nextInt();
          int d = in.nextInt();

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

   }
}

Edited by author 15.03.2016 05:59
Re: в компиляторе работает, а тут runtime error
Послано ToadMonster 15 мар 2016 15:00
Good people don't want other people to guess. Good people show task number and type of error and test number - is it definitely "run-time error"?

I guess it is "1001 reverse root". In this case you MUST read and understand task. Does task say you have 4 and only 4 integers to read? Task says you have unknown number of 64 bit longs to read. Task also says you should write output in reverse order.

Also I think you haven't check task sample locally. Your program should fail during reading "876652098643267843" as 32 bit int.