At long last, solution for 262 (runs in 0.1s).