Codeforces Beta Round #17 D. Notepad
原题:http://codeforces.com/contest/17/problem/D
题意:求[(b-1)*b^(n-1)]%c, 如果ans = 0, 则ans = c;
思路:指数循环节 ——
(其中Φ为欧拉函数);
#include
#define ll __int64
using namespace std;
const int maxn
原创
2016-11-28 16:52:35 ·
249 阅读 ·
0 评论