Pascal问题:)

[复制链接]
查看11 | 回复3 | 2013-7-15 22:53:39 | 显示全部楼层 |阅读模式
var
n,ans,pre,pre2:longint;
flag:boolean;begin
read(pre2);
read(pre);
ans:=0;
flag:=false;
repeat
read(n);
if n0 then begin
if (pre>=35)and(pre2>=35)and(n>=35)and(not flag) then begin
inc(ans);
flag:=true;
end
else flag:=false; ...
回复

使用道具 举报

千问 | 2013-7-15 22:53:39 | 显示全部楼层
以下是伪代码,不符合语法,不完整,仅供示意不能直接编译运行数组 tem[1..3]i:=1doread temif tem=0 break;if tem>35
if i=3 then 答案增加1并且tem[1]:=tem[3]并且i:=2
else i:=i+1;else i:=1;until 1=3...
回复

使用道具 举报

千问 | 2013-7-15 22:53:39 | 显示全部楼层
var i,max,n:longint; a:array[-2..1000]ofinteger; x:boolean;procedure panduan; beginif (a>=35)and(a[i-1]>=35)and(a[i-2]>=35) then ifx=false then begin
...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行