Post History
Japt -x, 6 5 bytes Takes input as an array of integers p!UdÍ Try it p!UdÍ :Implicit input of array U p :Push ! : Logical NOT of Ud : Any true (not zero) when ...
Answer
#5: Post edited
- # [Japt](https://github.com/ETHproductions/japt) [`-x`](https://codegolf.meta.stackexchange.com/a/14339/), <s>6</s> 5 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- p!UdÍ
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LXg&code=cCFVZM0&input=WzIsMl0)
- # [Japt](https://github.com/ETHproductions/japt) [`-x`](https://codegolf.meta.stackexchange.com/a/14339/), <s>6</s> 5 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- Takes input as an array of integers
- p!UdÍ
- [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LXg&code=cCFVZM0&input=WzIsMl0)
- p!UdÍ :Implicit input of array U
- p :Push
- ! : Logical NOT of
- Ud : Any true (not zero) when
- Í : Subtracted from 2
- :Implicit output of sum of resulting array
#4: Post edited
# [Japt](https://github.com/ETHproductions/japt) [`-x`](https://codegolf.meta.stackexchange.com/a/14339/), 6 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)Takes input as an array of integers.dÍ?U:5[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LXg&code=ZM0/VTo1&input=WzIsMl0)dÍ?U:5 :Implicit input of array Ud :Any truthy (not 0) whenÍ : Subtracted from 2?U :If so, return U:5 :Else return 5:Implicit output reduced by addition
- # [Japt](https://github.com/ETHproductions/japt) [`-x`](https://codegolf.meta.stackexchange.com/a/14339/), <s>6</s> 5 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- p!UdÍ
- [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LXg&code=cCFVZM0&input=WzIsMl0)
#3: Post edited
- # [Japt](https://github.com/ETHproductions/japt) [`-x`](https://codegolf.meta.stackexchange.com/a/14339/), 6 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- Takes input as an array of integers.
- dÍ?U:5
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LXg&code=ZM0/VTo1&input=WzIsMl0)
- # [Japt](https://github.com/ETHproductions/japt) [`-x`](https://codegolf.meta.stackexchange.com/a/14339/), 6 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- Takes input as an array of integers.
- dÍ?U:5
- [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LXg&code=ZM0/VTo1&input=WzIsMl0)
- dÍ?U:5 :Implicit input of array U
- d :Any truthy (not 0) when
- Í : Subtracted from 2
- ?U :If so, return U
- :5 :Else return 5
- :Implicit output reduced by addition
#2: Post edited
- # [Japt](https://github.com/ETHproductions/japt) [`-x`](https://codegolf.meta.stackexchange.com/a/14339/), 6 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- dÍ?U:5
- [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LXg&code=ZM0/VTo1&input=WzIsMl0)
- # [Japt](https://github.com/ETHproductions/japt) [`-x`](https://codegolf.meta.stackexchange.com/a/14339/), 6 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- Takes input as an array of integers.
- dÍ?U:5
- [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LXg&code=ZM0/VTo1&input=WzIsMl0)