# 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: Fast Factorials

Here’s an interesting problem from CodeChef.com: ——– You are asked to calculate factorials of some small positive integers. Input An integer t, 1

# Solution to Problem 9 on Project Euler

The problem: A Pythagorean triplet is a set of three natural numbers, a b c, for which, a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc. My […]

# CodeChef Easy Problem: Factorial

Facebook Hacker Cup 2013 is coming up, so I started solving some problems on CodeChef.com 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 […]