编程语言
首页 > 编程语言> > 【Luogu3414】SAC#1 - 组合数

【Luogu3414】SAC#1 - 组合数

作者:互联网

problem

solution

codes

#include<iostream>
#define mod 6662333
using namespace std;
typedef long long LL;
LL dfs(LL a, LL b, LL p){
    if(b==1)return a%p;
    LL t = dfs(a,b>>1,p)%p;
    if(b%2==0)return t*t%p;
    else return t*t*a%p;
}
int main(){  
    LL n;  cin>>n;
    cout<<dfs(2,n-1,mod);
    return 0;
}

 

标签:b%,return,C#,LL,dfs,long,a%,SA,Luogu3414
来源: https://www.cnblogs.com/gwj13114/p/15556589.html