jerryR1 2009-03-27 03:13:00
点我顶贴
收藏
删除
var s:string;
i,j,n,m:longint;
begin
read(s);n:=0;m:=0;
for i:=1 to length(s) do
begin
if (s[i]>=’a’)and (s[i]<=’z’) then inc(n);
if (s[i]>=’A’) and (s[i]<=’Z’) then inc(m);
end;
if(m=4) then write(’4:0’);
if (m=3) then write(’4:0’);
if (m=2) then write(’3:1’);
if (m=1) then write(’1:1’);
if (m=0) then write(’0:4’);
end.
#4 hades@2009-03-27 03:13:00
10722
回复
删除
晾程序玩
program jyy;
var
e:string;
a,b,x:integer;
begin
readln(e);
for a:=1 to 2 do begin
for b:= 4 to 5 do begin
if (e[a]=e[b]) and (e[b]>=’a’) and (e[b]<=’z’) then
x:=x+1;
end;
end;
if x=2 then writeln(’1:1’) else
writeln(4-x,’:’,x);
end.