Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- n,i: integer;
- s1,s2:string;
- begin
- readln(n);
- readln(s1);
- readln(s2);
- for i:=1 to n do
- if s1[i] = 'R' then
- begin
- if s2[i] = 'R' then
- write('P')
- else if s2[i] = 'S' then
- write('R')
- else
- write('P');
- end
- else if s1[i]='S' then
- begin
- if s2[i] = 'R' then
- write('R')
- else if s2[i] = 'S' then
- write('R')
- else
- write('S');
- end
- else
- begin
- if s2[i]='R' then
- write('P')
- else if s2[i]='S' then
- write('S')
- else
- write('S');
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement