Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- lista = []
- def tribonacci(x): #Ciąg Tribonacciego
- a = 0
- b = 1
- c = 2
- lista2 = [0, 1, 2]
- while c < x:
- d = a + b + c
- a = b
- b = c
- c = d
- lista2.append(c)
- return lista2
- if n < 0:
- print("BLAD")
- else:
- for i in range(0, n):
- h = 0
- if 0 <= n <= 1000000000000:
- h = int(input())
- lista.append(h)
- x = max(lista)
- tribonacci(x)
- for i in range(0, n):
- a = lista[i]
- if a in tribonacci(x):
- print(str(lista[i]) + '\t' + 'TAK')
- elif a < 0:
- print("BLAD")
- else:
- print(str(lista[i]) + '\t' + 'NIE')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement