Created
September 12, 2022 18:08
-
-
Save modos/a0c4e8acdda0cd7edd9391701e633cf5 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
n,x,y = map(int,input().split()) | |
b=0 | |
while b*y <= n: | |
if (n-b*y)%x==0: | |
print((n-b*y)//x,b) | |
break | |
b+=1 | |
else: | |
print(-1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment