Files
contests/2023/rcpc/d1/editorial/B. Coins.cpp
2024-04-22 16:45:09 +03:00

39 lines
706 B
C++

/// Gheorghies Alexandru
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
bool isPrime(ll num){
if(num < 2)
return false;
for(ll divisor = 2; divisor * divisor <= num; divisor++){
if(num % divisor == 0)
return false;
}
return true;
}
int main()
{
ios_base::sync_with_stdio(false); cin.tie(0);
ll k;
cin>>k;
for(ll i = 0; i < k; i++){
ll n;
cin>>n;
if(n == 9)
cout<<"Second\n";
else if(n == 3)
cout<<"First\n";
else if(isPrime(n))
cout<<"Second\n";
else
cout<<"First\n";
}
return 0;
}