Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N = int(input())
- count = [0]
- def forr(j, limit, depth):
- #print(depth)
- if j == limit:
- return
- if depth == 0:
- count[0] += 1
- print(count[0], "PAA é legal")
- if depth == 1:
- forr(0, j + 1, 0)
- elif depth == 2:
- forr(0, j**2 + 1, 1)
- forr(j+1, limit, depth)
- forr(0, N + 1, 2)
- '''
- for i in range(N+1):
- for j in range(int(i)**2 + 1):
- for k in range(j + 1):
- count[0] += 1
- print(count[0], "PAA é legal")
- '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement