ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1024. Permutations

Why my program is WA at test 11, but I think my alg is correct. Please help me !!!
Posted by Pichayoot 16 Apr 2005 22:52
This is my program

[code deleted]

Edited by moderator 04.12.2019 20:51
Try this: (+)
Posted by Victor Barinov (TNU) 18 Apr 2005 02:39
Change this string:
k = k*k2/gcd(k, k2);

to:
k = k/gcd(k, k2)*k2;
or
k = k2/gcd(k, k2)*k;

Just, when you calculate k*k2 there is overflour, i think.

Edited by author 18.04.2005 02:40
Re: Try this: (+)
Posted by reason supreme 25 Jan 2008 18:34
yeah,you are right.
my program got the same question and it's ac with your help
THANK YOU VERY MUCH!
Re: Try this: (+)
Posted by nguyenductam 28 Mar 2010 15:21
I too, thank you very much
Re: Try this: (+)
Posted by nguyenductam 28 Mar 2010 15:26
I too, thank you very much
Re: Try this: (+)
Posted by gay 7 May 2010 13:29
I lick ass.mother shit on the floor
Re: Try this: (+)
Posted by Kuchumov_Ilya 9 Jan 2011 21:57
thank for htis corection....
Re: Try this: (+)
Posted by Yinthewind 1 May 2011 17:47
thank u very much!!!!