参考程序: program p1019; var
t,n,i,r,sum1,sum2:longint; a,b,tmp:char;
function pd(p1,p2:char):integer; begin
if p1=p2 then pd:=0 else begin
if (p1='R') and (p2='S') or (p1='S') and (p2='P') or (p1='P') and (p2='R') then pd:=1 else pd:=2; end; end;
begin
readln(t); while(t>0) do begin dec(t); readln(n); sum1:=0; sum2:=0;
for i:=1 to n do begin
readln(a,tmp,b); r:=pd(a,b);
if r=1 then inc(sum1); if r=2 then inc(sum2); end;
if sum1>sum2 then writeln('Player 1') else if sum1 writeln('TIE') end; end. program p25485; var y,n,s:longint; function dg(x:longint):longint; begin if x=n+1 then dg:=s else dg:=dg(x+1)+70; end; begin readln(n,s); writeln(dg(1)); end.

