Created
October 4, 2022 03:17
-
-
Save modos/7d4ce0349da8aee6b1f7a0f411e462c9 to your computer and use it in GitHub Desktop.
بدخواه پویان
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p, d = [int(i) for i in input().split()] | |
x = 1 | |
while True: | |
if 0 <= (x * d) % p <= p / 2: | |
print(x * d) | |
break | |
x += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment