Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. N = int(input())
  2. count = [0]
  3.  
  4. def forr(j, limit, depth):
  5.   #print(depth)
  6.   if j == limit:
  7.     return
  8.   if depth == 0:
  9.     count[0] += 1
  10.     print(count[0], "PAA é legal")
  11.   if depth == 1:
  12.     forr(0, j + 1, 0)
  13.   elif depth == 2:
  14.     forr(0, j**2 + 1, 1)
  15.   forr(j+1, limit, depth)
  16.  
  17. forr(0, N + 1, 2)
  18. '''
  19. for i in range(N+1):
  20.  for j in range(int(i)**2 + 1):
  21.    for k in range(j + 1):
  22.      count[0] += 1
  23.      print(count[0], "PAA é legal")
  24. '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement