check()是什么意思?
pascal吧
全部回复
仅看楼主
level 6
摩摩专答 楼主
如上,求“具体”用法
2013年08月20日 01点08分 1
level 12
没记错的话应该没有这个预定义函数吧
2013年08月20日 01点08分 2
level 5
应该是具体程序的标识符吧。。没具体意义。。
2013年08月20日 09点08分 4
level 13
2013年08月20日 09点08分 5
level 14
没听说过,可能是自定义的
2013年08月20日 10点08分 6
level 10
自己写的吧~一般来说判断都写check记得住什么意思……
2013年08月20日 15点08分 7
level 2
Var n,i,ans,l:integer;
a,b:array[1..5000]of integer;
s:ansistring;
function check():boolean;
var i:integer;
begin
for i:=1 to l do
if a[i]<>a[l-i+1] then exit(false);
exit(true);
end;
Begin
readln(n);
readln(s);
l:=length(s);
for i:=1 to l do
case s[i] of
*A*:a[i]:=10;
*B*:a[i]:=11;
*C*:a[i]:=12;
*D*:a[i]:=13;
*E*:a[i]:=14;
*F*:a[i]:=15;
else a[i]:=ord(s[i])-ord(*0*);
end;
while not check do
begin
fillchar(b,sizeof(b),0);
for i:=1 to l do
b[i]:=a[i]+a[l-i+1];
for i:=1 to l do
begin
inc(b[i+1],b[i] div n);
b[i]:=b[i] mod n;
end;
if b[l+1]<>0 then inc(l);
a:=b;
inc(ans);
if ans>30 then
begin
writeln(*Impossible!*);
halt;
end;
end;
writeln(*STEP=*,ans);
End.
程序已摆出,肯定是自己定义的……
2014年08月19日 09点08分 8
level 5
check,一般是自己定义的过程或者函数,一般写二分的时候检验用
2014年08月19日 14点08分 9
1