My Weblog

Blog about programming and math

Project Euler Problem 301

Project Euler problem 301 Easy problem if you encountered this problem before. Topcoder tutotial , Game Theory and combinatorial game theory have bit more explanation not only about nim but other complex games.

using namespace std;
int main()
		int sum=0;
		for(int i=1;i<=(1<<30);i++) if((i^(2*i)^(3*i))==0) sum++;

October 25, 2010 - Posted by | Programming

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: