Skip to content

Instantly share code, notes, and snippets.

@drygdryg
Created December 9, 2019 10:37
Show Gist options
  • Save drygdryg/be0608fb7a8cb037e19b6d93851e15a4 to your computer and use it in GitHub Desktop.
Save drygdryg/be0608fb7a8cb037e19b6d93851e15a4 to your computer and use it in GitHub Desktop.
Решение задачи A городской олимпиады по информатике (г. Луганск, 2019 г.)
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