RXD and math HDU - 6063
2017-08-01 18:54
423 查看
Sample Input
10 10
Sample Output
Case #1: 999999937
打表找规律 快速幂
#include<cstdio> using namespace std; #define ll long long const int mod=1e9+7; ///注意取余 ll pow(ll a,ll n) { ll text=1; while (n) { if (n&1) text = (text%mod)*(a%mod)%mod; a = (a%mod)*(a%mod)%mod; n >>= 1; } return text; } int main() { ll n,k; int i=1; while(~scanf("%lld%lld",&n,&k)) { ll text=pow(n,k); printf("Case #%d: %lld\n",i++,text); } return 0; }
相关文章推荐
- HDU 6063 RXD and math 打表找规律 快速幂
- 17暑假多校联赛3.8 HDU 6063 RXD and math
- HDU 6063 RXD and math【快速幂】【打表找规律】
- 2017 多校训练第三场 HDU 6063 RXD and math
- (2017多校训练第三场)HDU - 6063 RXD and math 找规律 + 快速幂
- HDU--6063--RXD and math
- RXD and math(HDU 6063 快速幂)
- hdu 6063 RXD and math(快速幂)
- 多校3 HDU - 6063 RXD and math 数学
- HDU 6063 RXD and math(数论)
- 17 多校 3 - 1008 - RXD and math(HDU 6063)
- HDU 6063-RXD and math
- HDU-6063-RXD and math-
- HDU 6063 RXD and math (打表)
- hdu-6063-RXD and math
- HDU 6063 RXD and math【数学】
- H - RXD and math HDU - 6063 多校第三场
- HDU 6063 17多校3 RXD and math(暴力打表题)
- (打表或数学)HDU 6063 RXD and math
- HDU 6063 RXD and math+(快速幂)+多校联赛第三场