307535: CF1370C. Number Game
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Number Game
题意翻译
有一个正整数 $n$。 两名玩家轮流操作。每次操作可以执行以下一种: - 将 $n$ 除以一个 $n$ 的大于 $1$ 的奇数因子。 - 将 $n$ 减去 $1$(若 $n\gt1$)。 无法操作者输。 问先手是否有必胜策略。如果先手有必胜策略,输出 `Ashishgup `,否则输出 `FastestFinger `。 多组数据,数据组数 $t \leq 100$,$1 \leq n \leq 10^9$ 翻译 by Meatherm题目描述
Ashishgup and FastestFinger play a game. They start with a number $ n $ and play in turns. In each turn, a player can make any one of the following moves: - Divide $ n $ by any of its odd divisors greater than $ 1 $ . - Subtract $ 1 $ from $ n $ if $ n $ is greater than $ 1 $ . Divisors of a number include the number itself. The player who is unable to make a move loses the game. Ashishgup moves first. Determine the winner of the game if both of them play optimally.输入输出格式
输入格式
The first line contains a single integer $ t $ ( $ 1 \leq t \leq 100 $ ) — the number of test cases. The description of the test cases follows. The only line of each test case contains a single integer — $ n $ ( $ 1 \leq n \leq 10^9 $ ).
输出格式
For each test case, print "Ashishgup" if he wins, and "FastestFinger" otherwise (without quotes).
输入输出样例
输入样例 #1
7
1
2
3
4
5
6
12
输出样例 #1
FastestFinger
Ashishgup
Ashishgup
FastestFinger
Ashishgup
FastestFinger
Ashishgup