Mirror Reflection LeetCode solution in Python

1
class Solution:
2
def mirrorReflection(self, p: int, q: int) -> int:
3

4
L = lcm(p, q)
5

6
if (L // q) % 2 == 0:
7
return 2
8

9
return (L // p) % 2

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0