Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- is_found = False
- counter = 1
- for i in range(1, n + 1):
- for j in range(1, i + 1):
- if counter > n:
- is_found = True
- break
- print(counter, end=" ")
- counter += 1
- if is_found:
- break
- print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement