| 记录编号 | 312742 | 评测结果 | AAAAATTAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 2197.NO.1双塔问题 | 最终得分 | 80 | ||
| 用户昵称 | 是否通过 | 未通过 | |||
| 代码语言 | C++ | 运行时间 | 0.040 s | ||
| 提交时间 | 2016-09-27 14:36:42 | 内存使用 | 0.42 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(){;}
//懒得写了,来打我呀