【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;
}
posted @ 2018-06-04 21:48  gwj1139177410  阅读(96)  评论(0编辑  收藏  举报
选择