摘要:
本篇将讲述一下辗转相除法 GCD(欧几里得)算法求的是两数的最大公约数 LCM算法则是在GCD的基础上算出两数的最小公倍数 辗转相除法是利用以下性质来确定两个正整数 a 和 b 的最大公因子的: ⒈ 若 r 是 a ÷ b 的余数,且r不为0, 则 gcd(a,b) = gcd(b,r) ⒉ a 和 阅读全文
摘要:
H - 三角形 4.1 Description A lattice point is an ordered pair (x,y) where x and y are both integers. Given the coordinates of the vertices of a triangle( 阅读全文