测试结果2: 测试结果正确
测试结果3: 测试结果正确
测试结果4: 测试结果正确
测试结果5: 测试结果错误.错误结果为:0:4
正确结果应为:1:1
提交代码: Program P;
Var
s1, s2 : String;
t, ut : Dword;
l1, l2 : Byte;
////////////////////////////////
Procedure Init;
Var
ch : Char;
Begin
l1 := 0;
Read(ch);
While ch <> Do
Begin
Inc(l1);
s1[l1] := ch;
Read(ch)
End;
Read(s2)
End;
////////////////////////////////
Procedure Work;
Var
i, j : Byte;
Begin
l2 := Length(s2);
t := 0;
ut := 0;
For i:=1 To l1 Do
For j := 1 To l2 Do
If (s1[i] >= a) And (s1[j] >= a)
Then
Inc(ut)
Else
Inc(t)
End;
////////////////////////////////
Procedure Outit;
Begin
Write(t, :, ut)
End;
////////////////////////////////
Begin
Init;
Work;
Outit
End.
var m:string[5]; ch:array[1..4] of boolean;i,j:integer;n:integer;
begin
readln(m);n:=0;
if ord(m[1])<=90 then ch[1]:=true else ch[1]:=false;
if ord(m[2])<=90 then ch[2]:=true else ch[2]:=false;
if ord(m[4])<=90 then ch[3]:=true else ch[3]:=false;
if ord(m[5])<=90 then ch[4]:=true else ch[4]:=false;
for i:=1 to 2 do
for j:=3 to 4 do
if ch[i] or ch[j] then inc(n);
case n of
0:writeln(0:4);
1:writeln(1:3);
2:writeln(1:1);
3:writeln(3:1);
4:writeln(4:0);
end;
end.