摘要: 又是一个坑题,注意求最小公倍数时先除后乘,不然会超范围,然后就wa..../*The least common multiple (LCM) of a set of positive integers is the smallest positive integer ... 阅读全文
posted @ 2018-04-13 22:34 MCQ 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 水题,没注意大数。。wa无数次#include #includeint main(){ char a[1500]; int sum; while(scanf("%s",&a)!=EOF) { if(strlen(a)==1&&a[... 阅读全文
posted @ 2018-04-13 22:12 MCQ 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 刚开始这题看起来比较容易,因为直接用递归的话很容易搞定。但是提交的时候总是不AC,仔细一看有很多格式限制,比如内存,运行时间,堆栈大小等的限制。所以递归是行不通的。 在网上查看了一下相关思路,再看看n的范围可以那么大,用一般方法肯定不行,这时候就要想到其中的规律。我们... 阅读全文
posted @ 2018-04-13 22:03 MCQ 阅读(144) 评论(0) 推荐(0) 编辑