diff options
Diffstat (limited to 'factors/mtc.go')
| -rw-r--r-- | factors/mtc.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/factors/mtc.go b/factors/mtc.go index 522a35c..655124c 100644 --- a/factors/mtc.go +++ b/factors/mtc.go @@ -5,7 +5,7 @@ package factors // multiplication table. func MTC(n uint64) uint64 { mtc := uint64(0) - for i := uint64(2); i <= n - 2; i++ { + for i := uint64(2); i <= n-2; i++ { mtc += n / gcd(i, n) } return mtc @@ -13,7 +13,7 @@ func MTC(n uint64) uint64 { func gcd(a, b uint64) uint64 { for b > 0 { - a, b = b, a % b + a, b = b, a%b } return a } |
