#abc193e. [abc193_e]Oversleeping

[abc193_e]Oversleeping

一个人坐公交从 AA 站坐到 BB 站,公交车先用 xx 秒到 BB 站,然后在 BB 站停 yy 秒,再用 xx 秒到 AA 站,再在 AA 站停 yy 秒,如此循环往复。而这个人先睡眠 pp 秒,再醒来 qq 秒,如此循环往复。求这个人最早何时能在 BB 站下车,若永远不能,输出 infinityinfinity