Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- v = int(input("Enter a number: "))
- stop = False
- k = 1
- s = 0
- while not stop:
- if s < v:
- k += 1
- s = s + k
- else:
- stop = True
- print('The min value of K to satisfy 1 + .. + k > V is {0}'.format(k))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement