Skip to content

Instantly share code, notes, and snippets.

Created May 23, 2019 17:36
What would you like to do?
zero = BigInt(0)
var entrada = leia_texto
enquanto entrada <> None.orNull faça
n = BigInt(entrada)
var pos = 0
enquanto zero.setBit(pos) < n faça
pos := pos + 1
head = zero.setBit(pos)
escreva "{n} {se head==n então "true {pos}" senão "false" fim}"
entrada := leia_texto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment