This commit is contained in:
commit
568474d52f
1591 files changed
+528213
No files matched your search
@@ -0,0 +1,11 @@
|
||||
# probe: gcd, lcm and comb from std.math on whole numbers, with negative and zero arguments, and a comb whose value does not fit in an Int
|
||||
from std.math import gcd, lcm, comb
|
||||
|
||||
|
||||
def main():
|
||||
print(gcd(84, 36), gcd(-84, 36), gcd(84, -36), gcd(0, 5), gcd(0, 0), gcd(7, 0), gcd(17, 5), gcd(-4, -6), gcd(6, 9), gcd(1024, 96))
|
||||
print(lcm(4, 6), lcm(-4, 6), lcm(4, -6), lcm(-4, -6), lcm(0, 5), lcm(0, 0), lcm(7, 7), lcm(6, 4), lcm(3, -1000000))
|
||||
print(comb(5, 2), comb(10, 0), comb(3, 5), comb(0, 0), comb(52, 5), comb(60, 30), comb(66, 33), comb(67, 33), comb(70, 35), comb(100, 50))
|
||||
var a = 1000000007
|
||||
var b = 998244353
|
||||
print(gcd(a * 6, b * 6), lcm(a, b))
|
||||
Reference in new issue
Block a user