LearnPy Hub
← Loops problems
Medium

How Many to Reach the Target?

Read a target T. Add 1 + 2 + 3 + … until the sum is at least T. Print how many numbers you added and the final sum.

Input

One integer T ≥ 1.

Output

One line.

Sample 1

Input
10
Output
4 10

Sample 2

Input
1
Output
1 1
solution.py
Output appears here
How Many to Reach the Target? · Python practice problem · LearnPy Hub