2349 - Boeing Travel

Discussion around the problems of the COJ.
Forum rules
Remember that posting AC code is not allowed here. If you are going to ask a question or to post a solution, describe your algorithm instead. Posting AC code will be penalized.
Post Reply
User avatar
ymondelo20
Posts: 1968
Joined: 8 years ago
Location: Universidad de las Ciencias Informáticas
Gender: None specified
Contact:

2349 - Boeing Travel

Post by ymondelo20 » 7 years ago



"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

User avatar
Dariel
Posts: 51
Joined: 8 years ago
Location: Santiago de Cuba
Gender: None specified
Contact:

Re: 2349 - Boeing Travel

Post by Dariel » 7 years ago

Why WA in this problem. My solution is B= ( A + (N-1) *N / 2 ) % N.
¿What's wrong with the above stated?

User avatar
ymondelo20
Posts: 1968
Joined: 8 years ago
Location: Universidad de las Ciencias Informáticas
Gender: None specified
Contact:

Re: 2349 - Boeing Travel

Post by ymondelo20 » 7 years ago

Easy :D
... % N is zero for some cases...
... and stop 0 don't exist in the circle.
"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

User avatar
Dariel
Posts: 51
Joined: 8 years ago
Location: Santiago de Cuba
Gender: None specified
Contact:

Re: 2349 - Boeing Travel

Post by Dariel » 6 years ago

Thank you!!!...

Post Reply

Return to “Problem set”