Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
136164 陈家宝 单峰排列 C++ 通过 100 0 MS 256 KB 374 2024-03-08 13:18:34

Tests(10/10):


#include<bits/stdc++.h> using namespace std; #define LL long long const int N = 1e5 + 10,INF = 0x3f3f3f3f; LL power(LL a,LL b,LL p){ if(a==0)return 0; if(b==1)return 0; LL ans=1; while(b!=0){ if(b%2 ==1)ans=(ans*a)%p; b/=2; a=(a*a)%p; } return ans%p; } int main () { LL a,b,p; cin >>b; p=1234567; cout << power(2,b-1,p); return 0; }


测评信息: