#[GML][1] - 76 bytes n=argument0;i=n;while~-1{n+=(n mod i<1)i(n/i mod 2*2-1)i--}show_message(n) [1]: http://en.wikipedia.org/wiki/GameMaker:_Studio#Scripting
Timtech
- 12.6k
- 2
- 46
- 61