作业帮 > 综合 > 作业

求2008年NOIP普及组复赛试题

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/26 12:01:59
求2008年NOIP普及组复赛试题
一、ISBN号码
基础字符串处理题,心细一点的基本都能得满分.
参考程序:
program isbn;
const
inp='isbn.in';
oup='isbn.out';
var
i,j,k,ans:longint;
s:string;
ch:char;
procedure flink;
begin
assign(input,inp);
reset(input);
assign(output,oup);
rewrite(output);
end;
procedure fclose;
begin
close(input);
close(output);
end;
begin
flink;
readln(s);// 输入字符串
j:=0;
i:=1;
ans:=0;
while j