Yukicoder No.337 P versus NP
No.337 P versus NP
ちょうど良い難易度
>>
,>++++++++[<---->-]<[ get until space
>
,>++++++++[<---->-]<]
>
,----------[ get until newline
>
,----------]
<<[>[<+>-]<<]>> sum sign and digits
++++++[<------>-]+<--[>-<[-]]>[- if is zero
<<<[<]<+>>[>]>> set equal flag
]
<<
<<[>[<+>-]<<]>> sum sign and digits
++++[<---->-]+<-[>-<[-]]>[- if is one
<<<+>>> set equal flag
]
++++++++[<++++>-]<+ make bang sign
<+<[>-<[-]]>[- if not equal
>.< put bang sign
]
+++++++[>++++>+<<-]>. put equal sign
>+++. put newline