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

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

Wa3
Послано svr 20 янв 2007 22:48
In what an essence of the problem? What is 'fishka'?
Doing as common by using cin for take integers from the
flow and after this using standard sqrt() with format "%.f4"
we have Wa3. What is bad? Or what complexities can appear
in a such problem.
Re: Wa3
Послано Lomir 21 янв 2007 01:54
Do not mix cin and printf().
Use or scanf + printf or cout + cin.
There are no 'fishka'.

However, if the perciption would be e-8, it wouild be unsolvable by standart sqrt.
Re: Wa3
Послано svr 21 янв 2007 10:49
Thank very much for answer.
But in many Ac progs I used printf cin and cout
simultaneously anf all were all rightt.
Your phrase about standart sqrt() I don.t understand.
Let you write out some input for which sqrt() will be bad.
Re: Wa3
Послано diver[rus] 21 янв 2007 12:56
May be you are using numbers of type 'float' with too small precision. Or read integers of some different from 'int64' type.

Try to use double type, while reading, computing, and writing result.