-
-
Save drygdryg/be0608fb7a8cb037e19b6d93851e15a4 to your computer and use it in GitHub Desktop.
Решение задачи A городской олимпиады по информатике (г. Луганск, 2019 г.)
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
s, p = map(int, input().split()) | |
res = 'NO SOLUTION' | |
for x in range(10001): | |
y = s - x | |
if x * y == p: | |
x, y = sorted([x, y]) | |
res = '{} {}'.format(x, y) | |
print(res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment