4 of 6
added 2 characters in body
user avatar
user avatar
#APL NARS, bytes 46, 22 chars
{∧/(t=-⍵-11π⍵),⍵≠t←⌽⍵}
11π⍵ find the sum of divisors of ⍵ in 1..⍵; Note the question want (11π⍵)-⍵
(11π⍵)-⍵=-(⍵-11π⍵)=-⍵-11π⍵ follow APLsm precedence
The test:
z←{∧/(t=-⍵-11π⍵),⍵≠t←⌽⍵}
z 284 220⋄z 52 100⋄z 10744 10856 ⋄z 174292 2345
1
0
1
0
z 100 117⋄z 6 11⋄z 495 495⋄z 6 6
0
0
0
0
user58988