摘要:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=2629好久没写博客了,随便捡道有点意思的题目写写。首先a,b的范围都到unsigned long long了有木有,最后f(a^b)还要再mod上n那么看到n的范围才1000,f(x)的递推式又有了,很容易就想到周期这东西。那么对a^b用快速幂的话,nice~剩下来的就是水水的东西了。。。#include #include #include #inc 阅读全文