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

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

WA # 7 help me,plz!
Послано Arthur 18 фев 2007 18:11
Re: WA # 7 help me,plz!
Послано Arthur 18 фев 2007 19:47
anybody, who knows where can be error! help!
Re: WA # 7 help me,plz!
Послано Fokysnik[LNU] 18 фев 2007 20:13
I'm also getting WA#7... and don't know why :'(
Re: WA # 7 help me,plz!
Послано Arthur 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!
Послано Соболева Оля 18 фев 2007 23:40
size of ansver is greatest longint.
Use int64.
Re: WA # 7 help me,plz!
Послано Fokysnik[LNU] 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
Re: WA # 7 help me,plz!
Послано Arthur 19 фев 2007 13:51
Thank you very much!
Re: WA # 7 help me,plz!
Послано Kit 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 :)
Re: WA # 7 help me,plz!
Послано Index Tree 19 фев 2007 21:12
Can anyone pls explain to me the sample output on test 3
Re: WA # 7 help me,plz!
Послано Olly 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
Re: WA # 7 help me,plz!
Послано Petr Huggy (Pskov) 20 май 2010 17:44
In test #7 the second line (instructions' string) is empty!
Re: WA # 7 help me,plz!
Послано gautamvs 16 июл 2013 22:54
the problem could be reading the line with 10^5 characters.
Re: WA # 7 help me,plz!
Послано huysgori 5 май 2022 14:47
How can we read a line of 10^5 chars in python and not get a runtime error?
Re: WA # 7 help me,plz!
Послано Vladislave 6 май 2022 01:08
use sys.stdin instead of input()