摘要:
Problem Description lcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.everybody objects to thi... 阅读全文
摘要:
Problem Description The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all ... 阅读全文
摘要:
辗转相除法,又被称为欧几里德(Euclidean)算法, 是求最大公约数的算法。 当然也可以求最小公倍数。算法描述 两个数a,b的最大公约数记为GCD(a,b)。a,b的最大公约数是两个数的公共素因子的乘积。如462可以分解成2 × 3 × 7 × 11;1071可以分解成3 ×... 阅读全文
摘要:
Problem Description Given a string containing only ‘A’ - ‘Z’, we could encode it using the following method: Each sub-string containing k sam... 阅读全文