#K11206. Encrypting Diary Entry
Encrypting Diary Entry
Encrypting Diary Entry
You are given an integer D representing the day of the month ((1 \le D \le 31)) and a string S which is the diary entry. The encryption is performed based on the day: if D is even, output the reverse of the diary entry; if D is odd, output the diary entry unchanged. The task is to process multiple test cases. This problem tests basic string manipulation and conditional logic.
inputFormat
The first line contains an integer T, the number of test cases. Each test case consists of two lines: the first line contains an integer D (where (1 \le D \le 31)) and the second line contains the diary entry S. The diary entry S may include spaces and can be empty.
outputFormat
For each test case, print the encrypted diary entry on a separate line. If D is even, print the reverse of S; if D is odd, print S as it is.## sample
3
2
i love coding challenges
15
today is a beautiful day
28
hello world
segnellahc gnidoc evol i
today is a beautiful day
dlrow olleh
</p>