Pile of Coins
Practice
3.7 (21 votes)
Basic programming
Basics of implementation
Easy
Game theory
Implementation
Logic Based
Logical reasoning
Problem
68% Success 3795 Attempts 20 Points 2s Time Limit 256MB Memory 1024 KB Max Code

Ashish and Jeel are playing a game. They are given two piles of coins with \(P\) and \(Q\) coins respectively. They take alterate turns. During each turn, the player can choose one pile and split it into two non-zero parts and discard the other pile that is not choosen. The discarded pile cannot be used further in the game. A player loses if he cannot make a move. Both the players play the game optimally.
You are given \(P\) and \(Q\). Determine who wins the game if Ashish plays first.

Input format

  • First line: An integer \(T\) denoting the number of test cases
  • Next \(T\) lines: Two integers \(P\) and \(Q\)

Output format

For each test case, print the winner of the game "Ashish" or "Jeel" (without quotes).
Answer for each test case should come in a new line.

Input Constraints

\(1 \le T \le 10\)

\(1 \le P, Q \le 10^6\)

 

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
46 votes
Tags:
Basic ProgrammingEasy
Points:20
61 votes
Tags:
Ad-HocAlgorithmsApprovedBasic ProgrammingEasyOpen
Points:20
77 votes
Tags:
ApprovedBasic ProgrammingEasyImplementationOpen