Submit | All submissions | Best solutions | Back to list |
ADAGAME4 - Ada and Game of Divisors |
Ada the Ladybug is playing Game of Divisors against her friend Velvet Mite Vinit. The game has following rules. There is a pile of N stones between them. The player who's on move can pick at least 1 and at most σ(N) stones (where σ(N) stands for the number of positive divisors of N). Obviously, N changes after each move. The one who won't get any stones (N == 0) loses.
As Ada the Ladybug is a lady, so she moves first. Can you decide who will be the winner? Assume that both players play optimally.
Input
The first line of input will contain 1 ≤ T ≤ 105, the number of test-cases.
The next T lines will contain 1 ≤ N ≤ 2*107, the number of stones which are initially in pile.
Output
Output the name of winner, so either "Ada" or "Vinit".
Example Input
8 1 3 5 6 11 1000001 1000000 29
Example Output
Ada Vinit Ada Ada Vinit Vinit Ada Ada
Added by: | Morass |
Date: | 2017-12-08 |
Time limit: | 2s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |
hide comments