随笔分类 -  数论

摘要:Implement pow(x, n), which calculates x raised to the power n (xn). Example 1: Example 2: Example 3: Note: -100.0 < x < 100.0 n is a 32-bit signed int 阅读全文
posted @ 2019-02-07 20:26 TobicYAL 阅读(184) 评论(0) 推荐(0)
摘要:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2019-02-01 14:07 TobicYAL 阅读(135) 评论(0) 推荐(0)
摘要:题目描述 Description 求两个数A和B的最大公约数。 1<=A,B<=2^31-1 题目描述 Description 求两个数A和B的最大公约数。 1<=A,B<=2^31-1 求两个数A和B的最大公约数。 1<=A,B<=2^31-1 输入描述 Input Description 两个整 阅读全文
posted @ 2018-02-13 22:32 TobicYAL 阅读(279) 评论(0) 推荐(0)
摘要:1012 最大公约数和最小公倍数问题 2001年NOIP全国联赛普及组 1012 最大公约数和最小公倍数问题 2001年NOIP全国联赛普及组 1012 最大公约数和最小公倍数问题 2001年NOIP全国联赛普及组 题目描述 Description 输入二个正整数x0,y0(2<=x0<100000 阅读全文
posted @ 2018-02-13 22:04 TobicYAL 阅读(244) 评论(0) 推荐(0)