Skip to content

Instantly share code, notes, and snippets.

@devmachiine
Created January 14, 2020 08:12
Show Gist options
  • Save devmachiine/8697029c8add37ab88ff92f28577d75a to your computer and use it in GitHub Desktop.
Save devmachiine/8697029c8add37ab88ff92f28577d75a to your computer and use it in GitHub Desktop.

Multiplication table

5 4 3 2 1
5 25 20 15 10 5
4 20 16 12 8 4
3 15 12 9 6 3
2 10 8 6 4 2
1 5 4 3 2 1

Remove redundant half

5 4 3 2 1
5 25
4 20 16
3 15 12 9
2 10 8 6 4
1 5 4 3 2 1

Replace with ordinals

5 4 3 2 1
5 1
4 2 3
3 4 5 7
2 6 8 10 12
1 9 11 13 14 15
@devmachiine
Copy link
Author

Thanks, nice catch! I updated the stack-overflow answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment