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

Обсуждение задачи 1525. Path

Arthur WA # 7 help me,plz! [13] // Задача 1525. Path 18 фев 2007 18:11
Arthur Re: WA # 7 help me,plz! [2] // Задача 1525. Path 18 фев 2007 19:47
anybody, who knows where can be error! help!
Fokysnik[LNU] Re: WA # 7 help me,plz! [1] // Задача 1525. Path 18 фев 2007 20:13
I'm also getting WA#7... and don't know why :'(
Arthur Re: WA # 7 help me,plz! // Задача 1525. Path 18 фев 2007 21:05
if you will find you mistake, please, write it here! ok?
and if i'll find my, i'll write it here too.
Соболева Оля Re: WA # 7 help me,plz! [5] // Задача 1525. Path 18 фев 2007 23:40
size of ansver is greatest longint.
Use int64.
Fokysnik[LNU] Re: WA # 7 help me,plz! [4] // Задача 1525. Path 19 фев 2007 00:46
Thanks! After your post I managed to solve it.
But, actually I was using int64, but...

I've found out that if you write like this:

ans:=x*y*z;         where ans is int64 and x,y,z are integer

you get WA

After I wrote:

ans:=x;
ans:=ans*y;
ans:=ans*z;

I got Accepted.

I think it happens because of calculation x*y*z is performed in integer and then converted to int64.
Interesting... :-|
Should have written in C. I guess I wouldn't have faced this if written in C.

Edited by author 19.02.2007 00:56
Arthur Re: WA # 7 help me,plz! // Задача 1525. Path 19 фев 2007 13:51
Thank you very much!
Kit Re: WA # 7 help me,plz! [2] // Задача 1525. Path 19 фев 2007 16:36
Fokysnik[LNU] писал(a) 19 февраля 2007 00:46
Should have written in C. I guess I wouldn't have faced this if written in C.
It's common feature of all compilers I know. I guess, C would not help you also :)
Index Tree Re: WA # 7 help me,plz! [1] // Задача 1525. Path 19 фев 2007 21:12
Can anyone pls explain to me the sample output on test 3
Olly Re: WA # 7 help me,plz! // Задача 1525. Path 23 фев 2007 19:18
I had wa7 too. be carefull

printf("%lld\n",ans) IS WRONG!
printf("%I64d\n",ans) is OK

for MSVS2005 it's no matter, but not for Timus compiler
Petr Huggy (Pskov) Re: WA # 7 help me,plz! [1] // Задача 1525. Path 20 май 2010 17:44
In test #7 the second line (instructions' string) is empty!
gautamvs Re: WA # 7 help me,plz! // Задача 1525. Path 16 июл 2013 22:54
the problem could be reading the line with 10^5 characters.
huysgori Re: WA # 7 help me,plz! [1] // Задача 1525. Path 5 май 2022 14:47
How can we read a line of 10^5 chars in python and not get a runtime error?
Vladislave Re: WA # 7 help me,plz! // Задача 1525. Path 6 май 2022 01:08
use sys.stdin instead of input()