My issue
In this problem for N=9, First Alice makes a move select 3 as odd prime factor of 9. Subtract N-3 makes it 3. Now Bob Selects 3 and now N=0. So Alice cannot amke a move Bob should win. But according to accepted solution Alice should win? Why so?
My code
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
if(n==1 || n%2==0)
cout<<"Bob"<<"\n";
else
cout<<"Alice"<<"\n";
}
}
Problem Link: FIZZBUZZ2305 Problem - CodeChef