Skip to main content
fix headline for leaderboard
Source Link
Martin Ender
  • 197.2k
  • 67
  • 447
  • 975

GML, 76 bytes

n=argument0;i=n;while~-1{n+=(n mod i<1)*i*(n/i mod 2*2-1)i--}show_message(n)

#[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#ScriptingInformation about GML

#[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

GML, 76 bytes

n=argument0;i=n;while~-1{n+=(n mod i<1)*i*(n/i mod 2*2-1)i--}show_message(n)

Information about GML

Source Link
Timtech
  • 12.6k
  • 2
  • 46
  • 61

#[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