monkeeShark/src/web/app/common/scripts/gcd.js

3 lines
68 B
JavaScript
Raw Normal View History

2017-02-16 08:20:45 +00:00
const gcd = (a, b) => !b ? a : gcd(b, a % b);
module.exports = gcd;