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

Обсуждение задачи 1074. Очень короткая задача

Показать все сообщения Спрятать все сообщения

How to input it (Java)? Mitrev Misa 10 апр 2009 00:38
I tried with Scanner and BufferedReader, but have no luck :(
Help????
Re: How to input it (Java)? akoskm 14 апр 2009 04:54
So... how to input it in Java?
Re: How to input it (Java)? Mitrev Misa 14 апр 2009 12:33
Thanks for support, but no one answers!!!! :D
Ask Donny, he knows the answer!!!!
Re: How to input it (Java)? donny 20 апр 2009 02:15
In this problem you need to parse the string, so I think you need to do it char by char.

I used BufferedReader.readLine, and then parsed the aquired string...

I tried using a StringReader created out of the string, and then used it's read() method to get chars out of it, but you could also read the chars directly from the string (charAt(int)), or you could dump it into an char array.

The first test is the sample test (I'm pretty sure). Note that -0.051 gets printed as 0.0 withouth a minus sign in front.
Re: How to input it (Java)? Oleg Strekalovsky [Vologda SPU] 21 апр 2009 00:43
Look at first http://acm.timus.ru/help.aspx?topic=java
Scanner in = new Scanner(System.in);
And use method of this object,(for example)
int x = in.nextInt();
long x = in.nextLong();
String st = in.nextLine();
and etc.