Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ile = int(input("Wpisz ile ma byc wpisanych liczb: "))
- lista = []
- def tribo(n):
- x1, x2, x3 = 0, 1, 2
- lista2 = [0, 1, 2]
- while x3 < n:
- suma = x1 + x2 + x3
- x1 = x2
- x2 = x3
- x3 = suma
- lista2.append(x3)
- return lista2
- if 0 > ile:
- print("BLAD")
- else:
- for _ in range(ile):
- n = 0
- if 0 <= n <= 1000000000000:
- n = int(input("Liczba: "))
- lista.append(n)
- for i in range(ile):
- x1 = lista[i]
- if x1 in tribo(n):
- print(str(lista[i]) + '\tTAK')
- elif x1 < 0:
- print("BLAD")
- else:
- print(str(lista[i]) + '\tNIE')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement