摘要: 题目链接:https://acm.zzuli.edu.cn/zzuliacm/problem.php?cid=1242&pid=4 解法:题中给是求一个等比数列的前n项和取模(1e9+7),已知等比数列前n项求和公式为$s=\frac{a_1(q^n 1)}{q 1}$,现在求前n+1项即可,q== 阅读全文
posted @ 2017-08-18 22:06 LuSimon 阅读(596) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/contest/839/problem/B cpp include include include include include using namespace std; const int maxn = 100 + 5; int n, k; 阅读全文
posted @ 2017-08-18 15:53 LuSimon 阅读(97) 评论(0) 推荐(0) 编辑