Tổng từ 1 đến N nhỏ nhất


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 1G

Problem type

Cho số nguyên $N$. Hãy tìm $k$ nhỏ nhất sao cho: $1+2+3+...+k \ge N$.

Dữ liệu

  • Một số nguyên duy nhất $N$ $(1\le N \le 10^{16})$.

Kết quả

  • Kết quả bài toán.

Ví dụ

Ví dụ 1

input

5

output

3

Comments

There are no comments at the moment.