摘要: Educational JourneyThe University of Calgary team qualified for the 28th ACMInternational Collegiate Programming Contest World Finalsin Prague, ... 阅读全文
posted @ 2015-07-27 16:31 万俟天亮 阅读(263) 评论(0) 推荐(0) 编辑
摘要: Coco MonkeyThis is the story of a time long ago. There were these sailors stranded on a beautiful island full offcoconut trees. And what do ... 阅读全文
posted @ 2015-07-27 10:02 万俟天亮 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Again Prime? No time.The problem statement is very easy. Given a number n you have to determine the largest power of m,not necessarily prime... 阅读全文
posted @ 2015-07-27 09:39 万俟天亮 阅读(166) 评论(0) 推荐(0) 编辑
摘要: How do you add?Larry is very bad at math — he usually uses a calculator, whichworked well throughout college. Unforunately, he is now struck... 阅读全文
posted @ 2015-07-27 09:15 万俟天亮 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 11889 Benefit题意: 给出T(T ≤ 100000)组数据;每组数据中给出A,C (1 ≤ A, C ≤ 10e7);已知LCM(A,B)=C,求最小的B 如果无解的话,输出 NO SOLUTION思路: 比较难懂,可以多思考几遍。首先b=c... 阅读全文
posted @ 2015-07-25 20:21 万俟天亮 阅读(162) 评论(0) 推荐(0) 编辑
摘要: tip:当初自己是想复杂了,什么遍历求解,枚举之类的,其实很简单的 要求他的最大GCD和LCM,如果GCD是LCM的因数,那么不可能存在这样的数,否则输出这俩个数就行了。 因为既要保证GCD最小,又要保证LCM最大。题目链接: https://uva.onlinejudge.org/exter... 阅读全文
posted @ 2015-07-25 20:10 万俟天亮 阅读(205) 评论(0) 推荐(0) 编辑