/ SB域 /

记录详情

Accepted

/usr/bin/ld.bfd: warning: /out/link.res contains output sections; did you forget -T?
# 状态 耗时 内存占用
#1 Accepted 0ms 256.0 KiB
#2 Accepted 1ms 256.0 KiB
#3 Accepted 1ms 256.0 KiB
#4 Accepted 0ms 256.0 KiB
#5 Accepted 1ms 256.0 KiB
#6 Accepted 1ms 256.0 KiB
#7 Accepted 1ms 256.0 KiB
#8 Accepted 0ms 256.0 KiB
#9 Accepted 0ms 256.0 KiB
#10 Accepted 1ms 256.0 KiB

代码

var n,ans,m:longint;
function pow(x,n:longint):longint;
begin
 if n=0 then exit(1);
 pow:=pow(x, n div 2) MOD m;
 pow:=pow*pow MOD M;
 if n mod 2=1 then pow:=pow*x MOD M;
end;
begin
//assign(input,'H1N1.IN');
//assign(output,'H1N1.OUT');
//reset(input);
//rewrite(output);
 m:=7222222;
 readln(n);
 ans:=pow(2,n-1)mod M;
 writeln((ans+ans*ans) mod m);
close(input);
close(output);
end.

信息

递交者
类型
递交
题目
甲型流感(H1N1)
题目数据
下载
语言
Pascal
递交时间
2017-08-22 22:25:28
评测时间
2017-08-22 22:25:28
评测机
分数
100
总耗时
10ms
峰值内存
256.0 KiB