Saleh127

cf 1370C

Jun 20th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define Faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. int main()
  7. {
  8. Faster
  9. test
  10. {
  11. ll a,c=0,d,e,f,i,j,k,l;
  12. cin>>a;
  13. if(a==1) printf("FastestFinger\n");
  14. else if(a%2==1 || a==2) printf("Ashishgup\n");
  15. else
  16. {
  17. for(i=3;i<=sqrt(a);i++)
  18. {
  19. if(a%i==0)
  20. {
  21. if(i%2!=0 || (a/i)%2!=0)
  22. {
  23. c=1;
  24. break;
  25. }
  26. }
  27. }
  28. if(c) printf("Ashishgup\n");
  29. else printf("FastestFinger\n");
  30. }
  31. }
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment