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

Обсуждение задачи 1294. Марсианские спутники

In this problem,rounding the double value to the nearest integer appeares to be the most tricky part of the whole problem.
If you want to guarantee correct rounding, do it yourself with floor() and ceil().
At least,as it happened to me.:)
You can do it like this:
printf("%.0lf\n", res);
You are absolutely right: ``cout << int(r)'' is WA, while ``printf("Distance is %.0lf km.", r);'' is AC.