标签:相同 == names span 思路 www type new main
#include<cstdio>
#include<iostream>
using namespace std;
typedef long long ll;
const int mod=100003;
ll read() {
ll x=0, tmp=1;
char ch=getchar();
//wxywwwwwwwwwwwwwwwwwwww
while( (ch<'0') || (ch>'9') ){
if(ch=='-')tmp=-1; ch=getchar();}
while( (ch>='0')&&(ch<='9') ){
x=x*10+ch-'0';ch=getchar();
}//wxywwwwwwwwwwwwwwww
return (x*tmp);
}
ll qmi(ll x,ll y) {
ll ans=1;
ll now=x;
while(y) {
if(y&1) ans=ans*now%mod;
now=now*now%mod;
y>>=1;
}
return ans;
}
int main() {
ll m=read();
ll n=read();
cout<<(qmi(m,n)%mod-qmi(m-1,n-1)*m%mod+mod)%mod;
return 0;
}
标签:相同 == names span 思路 www type new main
原文地址:https://www.cnblogs.com/wxyww/p/9774650.html