-1
Task
Your task is to write as short as possible program preferably in Brainf**k which determines the last digit of given number after it's conversion from decimal to binary system.
Input
An integer in decimal system consisting of up to 200 digits. There is a newline character (ASCII 10) after the given number
Output
One digit (1 or 0) which is the last digit of given number after it's conversion to binary system.
Example
4372667135165131576213 -> 1
1
Are you looking for https://codegolf.stackexchange.com/a/113513/17602 ?
– Neil – 2019-03-27T21:14:01.400Output has to be last digit of given number after its conversion to binary – jean – 2019-03-27T21:18:37.287
...Which is the parity of the number (i.e. whether it is odd or even) – Jo King – 2019-03-27T22:36:23.633
A bf answer from the parity question is here. It should work for decimal-encoded strings too, since the last bit will be 1 iff the number is odd.
– GammaFunction – 2019-03-27T22:55:05.3401
Since you wanted a brainfuck answer on your last question I'd suspect that these are homework questions... except that this is brainfuck lol
– Jo King – 2019-03-28T00:52:24.977+[>,+]<<<,+>[[>]+<[-<]>]++++++[->++++++++<]>.
since you like EOF as-1
– Jo King – 2019-03-28T01:00:48.623