#Brainfuck, (削除) 41 (削除ここまで)(削除) 36 (削除ここまで)(削除) 31 (削除ここまで) 30 bytes
Brainfuck, (削除) 41 (削除ここまで)(削除) 36 (削除ここまで)(削除) 31 (削除ここまで) 30 bytes
Shortened by printing once right after input and with help from Ethan and user46915.
,.+++[->>+<-----<]>>---<-[>.<]
Previous version: Subtract 48 from the input, and if it's not zero, add 1 to the 48 to print ASCII 1 forever, otherwise print 0.
-[>+<-----]>--->,<[->->+<<]>[>+<]>.<[>.<]
I ran it here, but due to buffered output, you cannot see any output since the program never terminates on 1.
Edit: I had forgotten to print 0 on input 0. Fixed now. I like the >.< faces at the end.
#Brainfuck, (削除) 41 (削除ここまで)(削除) 36 (削除ここまで)(削除) 31 (削除ここまで) 30 bytes
Shortened by printing once right after input and with help from Ethan and user46915.
,.+++[->>+<-----<]>>---<-[>.<]
Previous version: Subtract 48 from the input, and if it's not zero, add 1 to the 48 to print ASCII 1 forever, otherwise print 0.
-[>+<-----]>--->,<[->->+<<]>[>+<]>.<[>.<]
I ran it here, but due to buffered output, you cannot see any output since the program never terminates on 1.
Edit: I had forgotten to print 0 on input 0. Fixed now. I like the >.< faces at the end.
Brainfuck, (削除) 41 (削除ここまで)(削除) 36 (削除ここまで)(削除) 31 (削除ここまで) 30 bytes
Shortened by printing once right after input and with help from Ethan and user46915.
,.+++[->>+<-----<]>>---<-[>.<]
Previous version: Subtract 48 from the input, and if it's not zero, add 1 to the 48 to print ASCII 1 forever, otherwise print 0.
-[>+<-----]>--->,<[->->+<<]>[>+<]>.<[>.<]
I ran it here, but due to buffered output, you cannot see any output since the program never terminates on 1.
Edit: I had forgotten to print 0 on input 0. Fixed now. I like the >.< faces at the end.
#Brainfuck, (削除) 41 (削除ここまで) (削除) 36 (削除ここまで) 31(削除) 31 (削除ここまで) 30 bytes
Shortened by printing once right after input and with help from Ethan and user46915.
,.[>+>+<<+++[-]>>+<-[>-<---<]>>---]>+++[><-[>.<]
Previous version: Subtract 48 from the input, and if it's not zero, add 1 to the 48 to print ASCII 1 forever, otherwise print 0.
-[>+<-----]>--->,<[->->+<<]>[>+<]>.<[>.<]
I ran it here, but due to buffered output, you cannot see any output since the program never terminates on 1.
Edit: I had forgotten to print 0 on input 0. Fixed now. I like the >.< faces at the end.
#Brainfuck, (削除) 41 (削除ここまで) (削除) 36 (削除ここまで) 31 bytes
Shortened by printing once right after input and with help from Ethan.
,.[>+>+<<-]-[>-<-----]>+++[>.<]
Previous version: Subtract 48 from the input, and if it's not zero, add 1 to the 48 to print ASCII 1 forever, otherwise print 0.
-[>+<-----]>--->,<[->->+<<]>[>+<]>.<[>.<]
I ran it here, but due to buffered output, you cannot see any output since the program never terminates on 1.
Edit: I had forgotten to print 0 on input 0. Fixed now. I like the >.< faces at the end.
#Brainfuck, (削除) 41 (削除ここまで) (削除) 36 (削除ここまで) (削除) 31 (削除ここまで) 30 bytes
Shortened by printing once right after input and with help from Ethan and user46915.
,.+++[->>+<-----<]>>---<-[>.<]
Previous version: Subtract 48 from the input, and if it's not zero, add 1 to the 48 to print ASCII 1 forever, otherwise print 0.
-[>+<-----]>--->,<[->->+<<]>[>+<]>.<[>.<]
I ran it here, but due to buffered output, you cannot see any output since the program never terminates on 1.
Edit: I had forgotten to print 0 on input 0. Fixed now. I like the >.< faces at the end.
#brainfuck#Brainfuck, (削除) 41 (削除ここまで) (削除) 36 (削除ここまで) 31 bytes
Shortened by printing once right after input and with help from Ethan.
,.[>+>+<<-]-[>-<-----]>+++[>.<]
Previous version: Subtract 48 from the input, and if it's not zero, add 1 to the 48 to print ASCII 1 forever, otherwise print 0.
-[>+<-----]>--->,<[->->+<<]>[>+<]>.<[>.<]
I ran it here, but due to buffered output, you cannot see any output since the program never terminates on 1.
Edit: I had forgotten to print 0 on input 0. Fixed now. I like the >.< faces at the end.
#brainfuck, (削除) 41 (削除ここまで) (削除) 36 (削除ここまで) 31 bytes
Shortened by printing once right after input and with help from Ethan.
,.[>+>+<<-]-[>-<-----]>+++[>.<]
Previous version: Subtract 48 from the input, and if it's not zero, add 1 to the 48 to print ASCII 1 forever, otherwise print 0.
-[>+<-----]>--->,<[->->+<<]>[>+<]>.<[>.<]
I ran it here, but due to buffered output, you cannot see any output since the program never terminates on 1.
Edit: I had forgotten to print 0 on input 0. Fixed now. I like the >.< faces at the end.
#Brainfuck, (削除) 41 (削除ここまで) (削除) 36 (削除ここまで) 31 bytes
Shortened by printing once right after input and with help from Ethan.
,.[>+>+<<-]-[>-<-----]>+++[>.<]
Previous version: Subtract 48 from the input, and if it's not zero, add 1 to the 48 to print ASCII 1 forever, otherwise print 0.
-[>+<-----]>--->,<[->->+<<]>[>+<]>.<[>.<]
I ran it here, but due to buffered output, you cannot see any output since the program never terminates on 1.
Edit: I had forgotten to print 0 on input 0. Fixed now. I like the >.< faces at the end.
- 31.8k
- 10
- 66
- 125