| 记录编号 | 244166 | 评测结果 | EEEEEEEEEE | ||
|---|---|---|---|---|---|
| 题目名称 | 2197.NO.1双塔问题 | 最终得分 | 0 | ||
| 用户昵称 | 是否通过 | 未通过 | |||
| 代码语言 | C++ | 运行时间 | 0.000 s | ||
| 提交时间 | 2016-03-31 15:22:49 | 内存使用 | 0.00 MiB | ||
#include<stdio.h>
#define mod 5201314
bool work(){
freopen("NO1shuta.in","r",stdin);
freopen("NO1shuta.out","w",stdout);
long long n;scanf("%lld",&n);
long long ans=1,x=3;
for(;n;x=x*x%mod,n>>=1)
if(n&1)ans=ans*x%mod;
printf("%lld",(ans+mod-1)%mod);
//while(1);
}
bool x=work();
int main(){;}