Created
May 23, 2019 17:36
-
-
Save lrlucena/18496936e7a5a5820e8bdc292e4732ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
fim | |
head = zero.setBit(pos) | |
escreva "{n} {se head==n então "true {pos}" senão "false" fim}" | |
entrada := leia_texto | |
fim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment