Skip to content

Instantly share code, notes, and snippets.

@izabera
Created January 5, 2025 02:05
Show Gist options
  • Save izabera/1f78276f028a3fdfc730983368bbea07 to your computer and use it in GitHub Desktop.
Save izabera/1f78276f028a3fdfc730983368bbea07 to your computer and use it in GitHub Desktop.
{n=$1;r=n":";for(p=2;p*p<=n;p++)while(n%p==0){r=r" "p;n/=p}$1=n>1?r" "n:r}1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment