11657 - Rational Billiard

All about problems in Volume 116. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
juancate
New poster
Posts: 3
Joined: Thu Mar 28, 2013 2:09 am

11657 - Rational Billiard

Post by juancate »

Hi,

I am trying to solve this problem by simulating collisions with the table's borders. But this approach gets TLE. What other approach can I use? Maybe some math?

Thank you.
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 11657 - Rational Billiard

Post by brianfry713 »

math
Check input and AC output for thousands of problems on uDebug!
juancate
New poster
Posts: 3
Joined: Thu Mar 28, 2013 2:09 am

Re: 11657 - Rational Billiard

Post by juancate »

How?
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 11657 - Rational Billiard

Post by brianfry713 »

start with the gcd(n, m)
Check input and AC output for thousands of problems on uDebug!
Post Reply

Return to “Volume 116 (11600-11699)”