Rock-Paper-Scissors | 프로그래밍의 벗 PivotOJ
PivotOJ

Rock-Paper-Scissors

시간 제한: 15000ms메모리 제한: 1024MB출처: EIO 2014-15 openBOJ 30044

문제

The rock-paper-scissors game is played as follows: Two players simultaneously pick their moves as ‘rock’, ‘paper’, or ‘scissors’. When both pick the same move, they each get zero points. When they pick different moves, the rock beats the scissors, the scissors beat the paper, and the paper beats the rock. The player who picked the winning move gets +1+1 and the loser 1-1 points. A match consists of a number of moves whose points are added. Thus, the sum of points of the two players at the end of a match will always be zero.

There are many rock-paper-scissors competitions where the main goal is to guess the opponent’s strategy and play against it.

The jury has implemented 10 simple programs that play rock-paper-scissors. Write a program to play against them and score as many points as possible.

출력

Your program is started a new for each opponent. Your program should write its move, followed by a newline, to the standard output and then read the opponent’s move from the standard input. Each move is designated by a capital letter: K (rock), P (paper), or R (scissors). The match is managed by a judge program that gets the moves of the jury’s program in the same way and keeps track of the score. The end of the match is signaled by L as the opponent’s move and after that your program should terminate immediately.

예제

예제 1

입력
K

P

R

(99997 moves)

L
출력
K

P

R

(99997 moves)

L
이 문제는 채점 준비 중입니다. 테스트 데이터가 확보되면 제출이 가능합니다.