http://www.codechef.com/problems/NUMGAME/
my c++ solution to codechef NUMGAME - yet another number game: http://ideone.com/L7cjyb
#include <iostream>
using namespace std;
int main() {
 // your code goes here
 int a, b;
 cin>>a;
 while(a--) {
  cin>>b;
  if(b%2) cout<<"BOB"<<endl;
  else cout<<"ALICE"<<endl;
 }
 return 0;
}
NOTE: imho, you should focus on divisor, the least possible divisor(here 1) so that rounds take longer, and chances of player get maximized
No comments:
Post a Comment