#K2881. Card Game Winner
Card Game Winner
Card Game Winner
You are given T test cases. In each test case, you are provided with two parts:
- A pair of integers N (the number of cards) and K (the divisor).
- A list of N integers representing the values on the cards.
The rule of the game is as follows: if there is at least one card whose value is divisible by K (i.e. \(card \mod K = 0\)), then the winner for that test case is Arjun; otherwise, the winner is Priya.
Both players play optimally. Your task is to determine the winner for each test case.
inputFormat
The first line contains an integer T, denoting the number of test cases.
For each test case:
- The first line contains two space-separated integers N and K.
- The second line contains N space-separated integers representing the card values.
outputFormat
For each test case, output a single line containing either Arjun
if there exists at least one card whose value is divisible by K, or Priya
otherwise.
1
3 5
2 5 8
Arjun
</p>