Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input("Digite o número: "))
- flag=False
- cont = 1
- while cont<n:
- num = (cont-1)*cont*(cont+1)
- if(num==n):
- flag = True
- cont+=1
- if flag==True:
- print("Acertou!")
- else:
- print("Errou!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement