add day 2 part 1
This commit is contained in:
parent
12e65b8695
commit
a7107c1a1e
10
day2-1.uiua
Normal file
10
day2-1.uiua
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# %s/\(.\) \(.\)/"\1\2"_/
|
||||||
|
# %s/_$//
|
||||||
|
DecodeChar ← ((@S|@P)↥=@B∶=@Y.|⋅∘∶@R)↥=@A∶=@X..
|
||||||
|
CharValue ← |1 ⋅∘∶/(((3|2)=@P|⋅∘∶1)=@R.DecodeChar)
|
||||||
|
Battle ← ×3+1↥¯1↧1(∘|¯∘)×=0◿2,≠0.¯/-∵(⋅∘∶(=@P.|2)=@S.)
|
||||||
|
BattleChar ← |1 +CharValue∶Battle⊂/DecodeChar.
|
||||||
|
# @A_@X Rock -- @R
|
||||||
|
# @B_@Y Paper -- @P
|
||||||
|
# @C_@Z Scissors -- @S
|
||||||
|
/+≡BattleChar <input>
|
Loading…
Reference in New Issue
Block a user