← Back to List

9664번: NASLJEDSTVO ↗

Solutions

Python 3
176 B | 176 chars
n = int(input())
left = int(input())
L = []

for total in range(n,3000):
    z = total // n
    last = total - left
    if z == last:
        L.append(total)

print(L[0],L[-1])