Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #include <ext/pb_ds/assoc_container.hpp>
- #include <ext/pb_ds/tree_policy.hpp>
- using namespace std;
- using namespace __gnu_pbds;
- bool prime(int n){
- for(int i = 2; i * i <= n; i++)
- if(n % i == 0)
- return false;
- return true;
- }
- void new_test(){
- int num;
- read(num);
- if (((log(2, num)) != (int)log(2, num) || num == 2) && (num == 2 || ((unsigned)num & (unsigned)1) || num % 4 == 0 || !prime(num / 2)))
- println("Ashishgup");
- else
- println("FastestFinger");
- }
- int32_t main(){
- int test;
- cin >> test;
- while (test--){
- new_test();
- }
Advertisement
Add Comment
Please, Sign In to add comment