#P9022. [CCC 2021 J3] Secret Instructions
[CCC 2021 J3] Secret Instructions
Problem Description
Multiple test cases.
For each test case, read in digit characters.
- If the sum of the first two digits is odd, output
left. - If the sum of the first two digits is a non-zero even number, output
right. - If the sum of the first two digits is zero, output
leftorrightdepending on the previous test case.
Then output a space and the last three digit characters.
Input Format
Multiple test cases.
Each line contains digit characters.
Read until 99999.
Output Format
For each line, output one string and digit characters, separated by a space.
57234
00907
34100
99999
right 234
right 907
left 100
Hint
The third character read will not be .
The first test case will not start with .
Translated from CCC2021 J3.
Translated by ChatGPT 5