Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- combinations = 0
- for a in range(0, n + 1):
- for b in range(0, n + 1):
- for c in range(0, n + 1):
- if a + b + c == n:
- combinations += 1
- print(combinations)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement