TieTest←{⍝ Can there be a tie?⎕IO←0n←≢⍵⍝ Number of coinsb←2⊥⍣¯1⍳¯1+2*n⍝ Binary with n bitsd←(+⌿÷≢)b⍝ Division of coinsr←n÷⍨(⌈,⌊)n÷2⍝ Ratios of coins for 2 playersv←b[;⍸d∊r]⍝ 0 Valid divisions of n coins between 2 players∪⍵⊢⌸⍤1⍨⍉v⍝ All combinations of coins divided between 2 players}