USACO第一题报错

源代码:{ID:这里我没写错PROG:rideLANG:PASCAL}programRide;vara,b:string;vari,numa,numb,sa,sb:lon... 源代码:
{
ID:这里我没写错
PROG:ride
LANG:PASCAL
}
program Ride;
var a,b:string;
var i,numa,numb,sa,sb:longint;
begin
Assign(input,'ride.in');
Reset(input);
Assign(output,'ride.out');
Reset(output);
readln(a);
readln(b);
sa:=length(a);
sb:=length(b);
numa:=1;
numb:=1;
for i:=1 to sa do
numa:=(ord(a[i])-64)*numa;
for i:=1 to sb do
numb:=(ord(b[i])-64)*numb;
numa:=numa mod 47;
numb:=numb mod 47;
writeln(numa,numb);
if numa=numb then
writeln('GO') else
writeln('STAY');
readln(sa);
Close(input);
Close(output);
end.
错误信息:

> Run 1: Execution error: Your program exited with exit status `2'.

Your program's exit status might indicate Pascal Runtime Error 2.
Here is the message for that Runtime Error:
File not found: You can get this error when you tried to do an
operation on a file which doesn't exist.

------ Data for Run 1 [length=14 bytes] ------
COMETQ
HVNGAT
----------------------------

Your program printed data to stdout. Here is the data:
-------------------
-------------------
Run time error 2: File not found: You can get this error when you
tried to do an operation on a file which doesn't exist.
-------------------

各位大神看看是怎么一回事啊。。程序没有错,结果也正确。。
展开
 我来答
me2498313062
2013-07-31
知道答主
回答量:96
采纳率:0%
帮助的人:34.8万
展开全部
Reset(output);->Rewrite(output);
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式