NOIP2003普及组初赛试题及答案(4)
发布时间:2021-06-07
发布时间:2021-06-07
历届真题 pascal noip
writeln(a);
end.
输出:
2.program Program2;
var
a,t:string;
i,j:integer;
begin
a:=`morning`;
j:= l;
for i:=2 to 7 do
if (a[j]<a[i])then
j:= i;
j:= j-1;
for i:=1 to j do
write (a[i]);
end.
输出:
3.program Program3;
Var
a,b,c,d,sum:longint;
begin
read (a,b,c,d);
a:=a mod 23:
b:=b mod 28;
c:=c mod 33;
sum:=a*5544+b* 14421+c*1288-d;
sum:=sum+21252;
sum:=sum mod 21252;
if (sum=0)then
sum:=21252;
writeln(sum);
end.
输入:283 102 23 320 输出:
4.program program4;
var
a: array[0..5] of integer;
sum,n,max,i,j,k:integer;
上一篇:2010元宵节灯谜全集
下一篇:你应该学习的最难的领导力技能