noip初赛阅读程序试题 谁帮我做一下 好的话+分13.program chu7_2;var i,j,f:integer;a:array [1..8] of integer;beginfor i:=1 to 8 dobeginf:=i mod 2;if f=0 then a[i]:=0 else a[i]:=1;for j:=1 to i doif f=0 then a[i]:=a[i]+j else a[i]:=a[i
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/15 15:38:20
noip初赛阅读程序试题 谁帮我做一下 好的话+分13.program chu7_2;var i,j,f:integer;a:array [1..8] of integer;beginfor i:=1 to 8 dobeginf:=i mod 2;if f=0 then a[i]:=0 else a[i]:=1;for j:=1 to i doif f=0 then a[i]:=a[i]+j else a[i]:=a[i
noip初赛阅读程序试题 谁帮我做一下 好的话+分
13.program chu7_2;
var i,j,f:integer;
a:array [1..8] of integer;
begin
for i:=1 to 8 do
begin
f:=i mod 2;
if f=0 then a[i]:=0
else a[i]:=1;
for j:=1 to i do
if f=0 then a[i]:=a[i]+j
else a[i]:=a[i]*j
end;
for i:=1 to 8 do write(a[i]:5);
end.
14.program chu7_3;
var p,q,s,t:integer;
begin
readln(p);
for q:=p+1 to 2*p do
begin
t:=0; s:=(p*q)mod(q-p);
if s=0 then begin t:=p+q+(p*q)div(q-p); write(t:4); end;
end;
readln
end.
输入:12
输出:
noip初赛阅读程序试题 谁帮我做一下 好的话+分13.program chu7_2;var i,j,f:integer;a:array [1..8] of integer;beginfor i:=1 to 8 dobeginf:=i mod 2;if f=0 then a[i]:=0 else a[i]:=1;for j:=1 to i doif f=0 then a[i]:=a[i]+j else a[i]:=a[i
(13) a[1]=1;a[2]=3;a[3]=6;a[4]=10;a[5]=120;a[6]=21;a[7]=5040;a[8]=36
(14) 181 110 87 76 66 62 61 60