#K86262. Split Sum Game Outcome

    ID: 36826 Type: Default 1000ms 256MiB

Split Sum Game Outcome

Split Sum Game Outcome

Given a list of integers, determine if the initial game position is winning or losing for John. John wins if the number of integers is even and loses if it is odd.

In mathematical terms, let \( n \) be the number of integers. If \( n \bmod 2 = 0 \), then the output is W (winning); otherwise, the output is L (losing).

Note: The list of integers is provided for completeness, but the outcome is determined solely by the parity of \( n \).

inputFormat

The input is read from standard input (stdin) and consists of two lines.

  • The first line contains an integer \( n \) which represents the number of integers in the list.
  • The second line contains \( n \) space-separated integers.

For example:

4
1 2 3 4

outputFormat

The output should be written to standard output (stdout) and consists of a single character:

  • W if \( n \) is even.
  • L if \( n \) is odd.
## sample
3
1 2 3
L