← Back to List

14723번: 이산수학 과제 ↗

Solutions

Python 3
234 B | 234 chars
from math import sqrt
n=int(input())
k=0
check = False
for i in range(1,n+1):
    for j in range(1,i+1):
        k+=1
        if k == n:
            print(i+1-j,j)
            check = True
            break
    if check:
        break