讨论 / 求各位大神帮忙 求附思路
Nostalk 2012-12-25 05:05:00
点我顶贴 收藏 删除
var s:string;

i,j,m,n,k,l,sum:longint;

begin

read(s);

l:=length(s);

for i:=1 to l do

if s[i]='F' then

begin

for j:=i+1 to l do

if s[j]='B' then

begin

for k:=j+1 to l do

if s[k]='I' then inc(sum);

end;

end;

write(sum);

end.

#1 CoolBearShow@2012-12-25 05:05:00
回复 删除
我也是这样打的,错了。。。。。。
#2 2225614011@2014-04-10 03:06:16
回复 删除
序列长度最长2000,s要用ansistring。
查看更多回复
提交回复