there might be bugs i can't actually run it lol
1 :: read input :: 2 3 input: field 4 next!: input <- lua 'tonumber (io.read ("l"))' 5 6 7 :: find solution :: 8 9 [reorder! a b ...]: 10 if [a > b] 11 a <-> b 12 reorder! b ... 13 14 15 1st: field 0 16 2nd: field 0 17 3rd: field 0 18 19 next! 20 21 while input 22 : sum consecutive lines 23 total: field 0 24 while input 25 total <- total + input 26 next! 27 28 : update largest 3 29 reorder! total 3rd 2nd 1st 30 next! 31 32 33 print! [1st + 2nd + 3rd] 34
edit: found a bug already rip
