syat #6502(2008/06/14 22:46 GMT) [ Brainf*ck ] Rating3/3=1.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
●コメント版 +[> # while ({0}) do +>,< # {1} = 1 ; {2} = getchar() > # ** dollar check ** >>++++++[-<++++++>]<< # {3} = 36 dollar # ** compare {3} & {4} ** [->>+>+<<<] # {@2:@3} = !{@0} >>>[-<<<+>>>]<<< # {@0} = !{@3} >[->->+<<]< # {@2} = {@2} minus {@1} ; {@3} = !{@1} >>>[-<<+>>]<<< # {@1} = !{@3} >> >+<[[-]>-<]>[-<+>]< # ** invert result ** [[-]<<[-]<[-]<[-]>>>>] # {2:1:0} = 0 <[-]> # {3} = 0 << < [> # ** count up if input char is not dollar ** [->>>>>>+<<<<<<] # {8} = !{2} >>>>[-]>[-]> # {6:7} = 0 ; move to {8} [- [->>+<<]+>> ] # ** extend arm to {8 plus (charcode times 2)} ** >+< # ** count up ** <<[[-]<<] # ** reduce arm ** <<<< [-]<[-]> # {2:1} = 0 <] <] # end ** next char ** # show result >>>>>>>> >>+ [ >[[-<.>]++++++++++.[-]]< [->>+<<]>>+ ] ●コメントなし版 +[>+>,<>>>++++++[-<++++++>]<<[->>+>+<<<]>>>[-<<<+>>>]<<<>[->->+<<]<>>>[-<<+>>]<<<>>>+<[[-]>-<]>[-<+>]<[[-]<<[-]<[-]<[-]>>>>]<[-]><<<[>[->>>>>>+<<<<<<]>>>>[-]>[-]>[-[->>+<<]+>>]>+<<<[[-]<<]<<<<[-]<[-]><]<]>>>>>>>>>>+[>[[-<.>]++++++++++.[-]]<[->>+<<]>>+]
Rating3/3=1.00-0+
[ reply ]
syat
#6502()
[
Brainf*ck
]
Rating3/3=1.00
コメントなし版を入力した結果
++++++++++++++++++++++++++++++++++++++
,
-------------------------
..
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
記号が多いですね(笑)
「>」69、「<」57、「+」38、角括弧30、「-」25。
入出力(.,)はごく少数。
ほとんどチューリングマシンなのでポインタの移動が多くなります。+はデータの作成に多用します。
●コメント版 +[> # while ({0}) do +>,< # {1} = 1 ; {2} = getchar() > # ** dollar check ** >>++++++[-<++++++>]<< # {3} = 36 dollar # ** compare {3} & {4} ** [->>+>+<<<] # {@2:@3} = !{@0} >>>[-<<<+>>>]<<< # {@0} = !{@3} >[->->+<<]< # {@2} = {@2} minus {@1} ; {@3} = !{@1} >>>[-<<+>>]<<< # {@1} = !{@3} >> >+<[[-]>-<]>[-<+>]< # ** invert result ** [[-]<<[-]<[-]<[-]>>>>] # {2:1:0} = 0 <[-]> # {3} = 0 << < [> # ** count up if input char is not dollar ** [->>>>>>+<<<<<<] # {8} = !{2} >>>>[-]>[-]> # {6:7} = 0 ; move to {8} [- [->>+<<]+>> ] # ** extend arm to {8 plus (charcode times 2)} ** >+< # ** count up ** <<[[-]<<] # ** reduce arm ** <<<< [-]<[-]> # {2:1} = 0 <] <] # end ** next char ** # show result >>>>>>>> >>+ [ >[[-<.>]++++++++++.[-]]< [->>+<<]>>+ ] ●コメントなし版 +[>+>,<>>>++++++[-<++++++>]<<[->>+>+<<<]>>>[-<<<+>>>]<<<>[->->+<<]<>>>[-<<+>>]<<<>>>+<[[-]>-<]>[-<+>]<[[-]<<[-]<[-]<[-]>>>>]<[-]><<<[>[->>>>>>+<<<<<<]>>>>[-]>[-]>[-[->>+<<]+>>]>+<<<[[-]<<]<<<<[-]<[-]><]<]>>>>>>>>>>+[>[[-<.>]++++++++++.[-]]<[->>+<<]>>+]Rating3/3=1.00-0+
[ reply ]