Monthly Archives: January 2013

Solution to Problem 10 on Project Euler

Not the most challenging one, but still: The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. My Solution #include <stdio.h> #include <math.h> int isPrime(num){   int i;   if (num==2)     return 1;   for (i=2;i<sqrt(num)+1;i++){     if (num%i==0)       return 0;     } […]

CodeChef Easy Problem: Factorial

Facebook Hacker Cup 2013 is coming up, so I started solving some problems on to warm up. Here’s one of them: ——————– The most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form the areas called cells (this term gave the name to the cellular phone) and […]