00:00
00:00
Newgrounds Background Image Theme

BorfDoggo just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Response to Python 2013-10-08 12:32:25


Works fine for me. What did you try where it didn't work?

Response to Python 2013-10-08 12:34:11


At 10/8/13 12:32 PM, Diki wrote: Works fine for me. What did you try where it didn't work?

Honestly, I tried to do this with C++:

bool isPrime(int num) {
	int j;

	for (j = 2; j < ((static_cast<int>(sqrt(num)) + 1)); j++) {
		if ((num % j) == 0) return false;
	}

	return true;
}

BBS Signature

Response to Python 2013-10-08 13:20:43


That code works as well. If it's not working for you then there must be a glitch in some other code that you're using.

Response to Python 2013-10-08 14:25:54


At 10/8/13 01:20 PM, Diki wrote: That code works as well. If it's not working for you then there must be a glitch in some other code that you're using.

Sweet, I fixed my code before you posted your response.

Ideone.com


BBS Signature

Response to Python 2013-10-08 14:27:01


I was completing Euler #10 .... 2000000 times out on ideone.


BBS Signature