├── .gitignore ├── C# ├── 1.Multiples_of_3_and_5 │ └── arya-prof.cs └── README.md ├── C ├── 03.Largest_prime_factor │ └── AxelMathei.c ├── 04.Largest_palindrome_product │ └── ValentinDSJ.c ├── 06.Sum_square_difference │ └── AxelMathei.c ├── 07.10001st_prime │ └── AxelMathei.c ├── 1.Multiples_of_3_and_5 │ └── dev-sb.c ├── 10. Summation_of_primes │ └── Kavya-Shekar.c ├── 11.Largest_product_in_a_grid │ └── AxelMathei.c ├── 12.Highly_divisible_triangular_number │ ├── AxelMathei.c │ └── prajwal-naik.c ├── 2. Even Fibonacci numbers │ └── even_fibonacci.c ├── 28.Number_spiral_diagonal │ └── pranshu2610.c ├── 50.Consecutive_prime_sum │ └── ValentinDSJ.c └── README.md ├── CPP ├── 04.Largest_palindrome_product │ └── pranshu2610.cpp ├── 06. Sum Square Difference │ └── xcyberpunkx0.cpp ├── 09.Special_Pythagorean_triplet │ └── pr4k.cpp ├── 10001st_prime.cpp ├── 28.Number_spiral_diagonal │ └── pranshu2610.cpp ├── 39.Integer_Right_Triangles │ └── mfarukkoc.cpp ├── Q5_Smallest_Multiple │ └── xcyberpunkx0.cpp ├── README.md ├── even_fibo.cpp ├── large_prime_factor.cpp └── multiple_3_n_5.cpp ├── Dart ├── 01.multiples_of_3_and_5 │ └── zohan4sh.dart ├── 02.even_fibbonaci │ └── zohan4sh.dart ├── 03.largestPrimeFactor │ └── akarshsingh9.dart ├── 05.Sum Square Difference │ └── sum_square_diff_akarshsingh9.dart ├── 07.10001st_Prime │ └── akarshsingh9.dart └── README.md ├── Go Lang ├── 01.Multiples_of_3_and_5 │ └── mehran75.go ├── 02.Even_Fibonacci_numbers │ └── mehran75.go ├── 03.largest_prime_factor │ └── mehran75.go ├── 04.largest_palindrome_product │ └── pancakem.go ├── 05.Smallest_multiple │ └── jdbr99.go ├── 06.sum_square_difference │ └── pancakem.go ├── 50.Consecutive_prime_sum │ └── ValentinDSJ.go └── README.md ├── JS ├── 01.Multiples_of_3_and_5 │ └── Higor_Snt.js ├── 02.Even_Fibonacci_Numbers │ └── Matheus_Muriel.js ├── 03.Largest_Prime_Factor │ └── Higor_Snt.js ├── 04.Largest_Palindrome_Product │ └── Matheus_Muriel.js ├── README.md └── index.html ├── Java ├── 04.Largest_Palindrome_Product │ └── anubhavm55.java ├── 1.Multiples of 3 and 5 │ └── Multiples.java ├── 16.Power Digit Sum │ └── pragyanmehrotra.java ├── 2.Even Fibonacci numbers │ ├── EvenFibonacci.java │ └── mucahidcelik.java ├── 20.Factorial Digit Sum │ └── pragyanmehrotra.java ├── 27. Quadratic Primes │ └── ritwickghosh.java ├── 28.Number spiral diagonals │ └── danmoren.java ├── 3.Largest Prime Factor │ ├── LargestPrime.java │ └── ProjectEuler3.java ├── 31.Coin sums │ └── danmoren.java ├── 39.Integer Right Triangles │ └── gunjanraval.java ├── 6.Sum Square Difference │ ├── mucahidcelik.java │ └── pragyanmehrotra.java └── README.md ├── Kotlin ├── 1.MultiplesOf3and5.kt ├── 2.EvenFibonacci.kt ├── 20.Factorial_digit_sum │ └── bartonstanly.kt └── README.md ├── Python ├── 07.10001st_prime │ └── Vipul-Bajaj.py ├── 1. Multiples of 3 and 5 │ ├── multiples.py │ └── multiples_3_and_5.py ├── 10. Summation of primes │ └── Artyko.py ├── 11. Largest Product in Grid │ ├── av-arvind77.py │ └── euler11.txt ├── 12. Highly_divisible_triangular_number │ └── ankitRai96.py ├── 13. Large sum │ ├── jac08h.py │ ├── ramonssarmento.py │ └── vrindaaa.py ├── 16. Power digit sum │ ├── PowerDigitSum.py │ └── vrindaaa.py ├── 17.Number_letter_counts │ └── prajwal-naik.py ├── 18. Maximum path sum I │ └── ramonssarmento.py ├── 2. Even Fibonacci numbers │ └── even_fibonacci.py ├── 20. Factorial digit sum │ └── jorgee97.py ├── 20.Factorial digit sum │ ├── hkp27299.py │ ├── said3427.py │ └── vrindaaa.py ├── 22.names_scores │ └── Vipul-Bajaj.py ├── 25.1000-digit_Fibonacci_number │ └── RodolfoFerro.py ├── 28. Number spiral diagonals │ └── said3427.py ├── 28.Number_spiral_diagonal │ └── pranshu2610.py ├── 29. Distinct powers │ └── said3427.py ├── 3. Largest Prime Factor │ └── largest_prime_fac.py ├── 30. Digit fifth powers │ └── said3427.py ├── 31. Coin sums │ └── kohzhixin.py ├── 35. Circular Prime │ └── av.arvind77.py ├── 4. Largest palindrome product │ ├── largest_palin_product.py │ └── palindrome_number.py ├── 40. Champernowne's constant │ └── walkerdea.py ├── 41. Pandigital prime │ └── Artyko.py ├── 42. Coded triangel numbers │ ├── Words.txt │ └── coded_triangle_num.py ├── 44. Pentagon Numbers │ └── av-arvind77.py ├── 45.Triangular, pentagonal, and hexagonal │ └── said3427.py ├── 46.Goldbach's other conjecture │ └── said3427.py ├── 47.Distinct primes factors │ └── said3427.py ├── 48. Self power │ └── selfpowers.py ├── 49.Prime permutations │ └── said3427.py ├── 5. Smallest multiple │ └── smallest_multi.py ├── 50. Consecutive prime sum │ └── said3427.py ├── 6. Sum square difference │ └── sum_square_difference.py ├── 7.10001st_prime │ └── SanchiMittal.py ├── 8. Largest product in a series │ └── LargestProductInASeries.py ├── 9.Special_Pythagorean_triplet │ └── pr4k.py └── README.md ├── R ├── 1. Multiples of 3 and 5 │ └── said3427.R ├── 2.Even Fibonacci numbers │ └── said3427.R ├── 3. Largest Prime Factor │ └── servindc.R └── README.md ├── README.md ├── Ruby ├── 01.Multiples of 3 and 5 │ └── 24sharkS.rb ├── 02.Even Fibonacci numbers │ └── 24sharkS.rb └── README.md └── Swift ├── 1. Multiples of 3 and 5 └── multiplesOf3And5.swift └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.iml 3 | -------------------------------------------------------------------------------- /C#/1.Multiples_of_3_and_5/arya-prof.cs: -------------------------------------------------------------------------------- 1 | // Euler 1 2 | using System; 3 | 4 | namespace _5_multiples 5 | { 6 | public class MainClass 7 | { 8 | public static void Main() 9 | { 10 | int currentNumber = 1000; 11 | int allSum = 0; 12 | 13 | currentNumber = currentNumber - 1; 14 | while (currentNumber > 0) 15 | { 16 | if ( (currentNumber % 3 == 0) | (currentNumber % 5 == 0)) 17 | { 18 | allSum = allSum + currentNumber; 19 | } 20 | currentNumber = currentNumber - 1; 21 | } 22 | Console.WriteLine(allSum); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /C#/README.md: -------------------------------------------------------------------------------- 1 | Add C# files here 2 | -------------------------------------------------------------------------------- /C/03.Largest_prime_factor/AxelMathei.c: -------------------------------------------------------------------------------- 1 | // Euler 03 2 | 3 | #include 4 | #include 5 | 6 | int main() { 7 | long long n = 600851475143; 8 | long long lastFactor = 0; 9 | if (n % 2 == 0) { 10 | lastFactor = 2; 11 | n /= 2; 12 | while (n % 2 == 0) 13 | n /= 2; 14 | } 15 | else 16 | lastFactor = 1; 17 | long long factor = 3; 18 | long long maxFactor = sqrtl(n); 19 | while (n > 1 && factor <= maxFactor) { 20 | if (n % factor == 0) { 21 | n /= factor; 22 | lastFactor = factor; 23 | while (n % factor == 0) 24 | n /= factor; 25 | maxFactor = sqrtl(n); 26 | } 27 | factor += 2; 28 | } 29 | if (n == 1) 30 | printf("%lld", lastFactor); 31 | else 32 | printf("%lld", n); 33 | } 34 | -------------------------------------------------------------------------------- /C/04.Largest_palindrome_product/ValentinDSJ.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | static int int_size(int nbr) 7 | { 8 | int i = 0; 9 | int mod_nbr = 10; 10 | int count = 0; 11 | 12 | if (nbr < 0) 13 | count += 1; 14 | while (i != nbr){ 15 | count += 1; 16 | i = nbr % mod_nbr; 17 | mod_nbr *= 10; 18 | } 19 | return (count); 20 | } 21 | 22 | static char *my_putnbr_string(int nb) 23 | { 24 | long mod_number = 10; 25 | int y; 26 | int i = 0; 27 | char *string = malloc(int_size(nb) + 1); 28 | 29 | if (nb < 0){ 30 | nb = nb * -1; 31 | } 32 | while (nb % mod_number != nb){ 33 | mod_number *= 10; 34 | } 35 | for (int x = mod_number; x >= 10; x = x / 10){ 36 | y = (nb % x) / (x / 10) + 48; 37 | string[i] = y; 38 | i += 1; 39 | } 40 | return (string); 41 | } 42 | 43 | bool is_palindrome(int x) 44 | { 45 | char *str = my_putnbr_string(x); 46 | 47 | for (int x = 0, y = strlen(str) - 1; x <= y; x++, y--) { 48 | if (str[x] != str[y]) 49 | return false; 50 | } 51 | return true; 52 | } 53 | 54 | int main(void) 55 | { 56 | int res = 0; 57 | int temp = 0; 58 | 59 | for (int x = 999; x > 0; x--) { 60 | for (int y = 999; y > 0; y--) { 61 | temp = x * y; 62 | if (is_palindrome(temp) && (temp > res)) 63 | res = temp; 64 | } 65 | } 66 | printf("%d\n", res); 67 | return 0; 68 | } -------------------------------------------------------------------------------- /C/06.Sum_square_difference/AxelMathei.c: -------------------------------------------------------------------------------- 1 | // Euler 06 2 | 3 | #include 4 | 5 | int main() { 6 | const int LIMIT = 100; 7 | int sum = LIMIT * (LIMIT + 1) / 2; 8 | int sum_sq = (2 * LIMIT + 1) * (LIMIT + 1) * LIMIT / 6; 9 | printf("%d", sum * sum - sum_sq); 10 | } 11 | -------------------------------------------------------------------------------- /C/07.10001st_prime/AxelMathei.c: -------------------------------------------------------------------------------- 1 | // Euler 07 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | bool isPrime(int n) { 8 | if (n == 1) 9 | return false; 10 | else if (n < 4) 11 | return true; 12 | else if (n % 2 == 0) 13 | return false; 14 | else if (n < 9) 15 | return true; 16 | else if (n % 3 == 0) 17 | return false; 18 | else { 19 | int r = sqrt(n); 20 | int f = 5; 21 | while (f <= r) { 22 | if ((n % f == 0) || (n % (f + 2) == 0)) 23 | return false; 24 | f += 6; 25 | } 26 | return true; 27 | } 28 | } 29 | 30 | 31 | int main() { 32 | const int LIMIT = 10001; 33 | int count = 1; 34 | int candidate = 1; 35 | do { 36 | candidate += 2; 37 | if (isPrime(candidate)) 38 | count += 1; 39 | } while (count < LIMIT); 40 | printf("%d", candidate); 41 | } 42 | -------------------------------------------------------------------------------- /C/1.Multiples_of_3_and_5/dev-sb.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int n = 1000; 5 | int sum = 0; 6 | for (int i = 1; i < n; i++) 7 | { 8 | if (i % 3 == 0 || i % 5 == 0) 9 | { 10 | sum += i; 11 | } 12 | } 13 | printf("%d", sum); 14 | } -------------------------------------------------------------------------------- /C/10. Summation_of_primes/Kavya-Shekar.c: -------------------------------------------------------------------------------- 1 | // Problem 10 : Summation of primes 2 | // The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. 3 | // Find the sum of all the primes below two million. 4 | 5 | #include 6 | #include 7 | 8 | int prime(long n); 9 | // return 1 if n is prime, else returns 0 10 | 11 | int main() 12 | { 13 | long n = 2000000; 14 | long sum = 2; 15 | for(long i = 3; i 4 | 5 | int main() { 6 | int grid[20][20] = { 7 | {8,02,22,97,38,15,00,40,00,75,04,05,07,78,52,12,50,77,91,8}, 8 | {49,49,99,40,17,81,18,57,60,87,17,40,98,43,69,48,04,56,62,00}, 9 | {81,49,31,73,55,79,14,29,93,71,40,67,53,88,30,03,49,13,36,65}, 10 | {52,70,95,23,04,60,11,42,69,24,68,56,01,32,56,71,37,02,36,91}, 11 | {22,31,16,71,51,67,63,89,41,92,36,54,22,40,40,28,66,33,13,80}, 12 | {24,47,32,60,99,03,45,02,44,75,33,53,78,36,84,20,35,17,12,50}, 13 | {32,98,81,28,64,23,67,10,26,38,40,67,59,54,70,66,18,38,64,70}, 14 | {67,26,20,68,02,62,12,20,95,63,94,39,63,8,40,91,66,49,94,21}, 15 | {24,55,58,05,66,73,99,26,97,17,78,78,96,83,14,88,34,89,63,72}, 16 | {21,36,23,9,75,00,76,44,20,45,35,14,00,61,33,97,34,31,33,95}, 17 | {78,17,53,28,22,75,31,67,15,94,03,80,04,62,16,14,9,53,56,92}, 18 | {16,39,05,42,96,35,31,47,55,58,88,24,00,17,54,24,36,29,85,57}, 19 | {86,56,00,48,35,71,89,07,05,44,44,37,44,60,21,58,51,54,17,58}, 20 | {19,80,81,68,05,94,47,69,28,73,92,13,86,52,17,77,04,89,55,40}, 21 | {04,52,8,83,97,35,99,16,07,97,57,32,16,26,26,79,33,27,98,66}, 22 | {88,36,68,87,57,62,20,72,03,46,33,67,46,55,12,32,63,93,53,69}, 23 | {04,42,16,73,38,25,39,11,24,94,72,18,8,46,29,32,40,62,76,36}, 24 | {20,69,36,41,72,30,23,88,34,62,99,69,82,67,59,85,74,04,36,16}, 25 | {20,73,35,29,78,31,90,01,74,31,49,71,48,86,81,16,23,57,05,54}, 26 | {01,70,54,71,83,51,54,69,16,92,33,48,61,43,52,01,89,19,67,48} 27 | }; 28 | const int D = 20; 29 | long max = 0; 30 | long p = 0; 31 | for (int i = 0; i < D; i++) { 32 | for (int j = 0; j < D; j++) { 33 | // Horizontal 34 | if (j < D - 3) { 35 | p = grid[i][j] * grid[i][j+1] * grid[i][j+2] * grid[i][j+3]; 36 | if (p > max) 37 | max = p; 38 | } 39 | // Vertical 40 | if (i < D - 3) { 41 | p = grid[i][j] * grid[i+1][j] * grid[i+2][j] * grid[i+3][j]; 42 | if (p > max) 43 | max = p; 44 | } 45 | // Diagonal left 46 | if ((i < D - 3) && (j >= 3)) { 47 | p = grid[i][j] * grid[i+1][j-1] * grid[i+2][j-2] * grid[i+3][j-3]; 48 | if (p > max) 49 | max = p; 50 | } 51 | // Diagonal right 52 | if ((i < D - 3) && (j < D - 3)) { 53 | p = grid[i][j] * grid[i+1][j+1] * grid[i+2][j+2] * grid[i+3][j+3]; 54 | if (p > max) 55 | max = p; 56 | } 57 | } 58 | }; 59 | printf("%ld", max); 60 | } 61 | -------------------------------------------------------------------------------- /C/12.Highly_divisible_triangular_number/AxelMathei.c: -------------------------------------------------------------------------------- 1 | // Euler 12 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | bool isPrime(int n) { 8 | if (n == 1) 9 | return false; 10 | else if (n < 4) 11 | return true; 12 | else if (n % 2 == 0) 13 | return false; 14 | else if (n < 9) 15 | return true; 16 | else if (n % 3 == 0) 17 | return false; 18 | else { 19 | int r = sqrt(n); 20 | int f = 5; 21 | while (f <= r) { 22 | if ((n % f == 0) || (n % (f + 2) == 0)) 23 | return false; 24 | f += 6; 25 | } 26 | return true; 27 | } 28 | } 29 | 30 | 31 | int main() { 32 | long n = 3; // start with a prime 33 | int Dn = 2; // number of divisors for any prime 34 | int cnt = 0; // to insure the while loop is entered 35 | int n1, Dn1, exponent; 36 | const int P = 200; 37 | int primearray[P]; 38 | 39 | // Initialize primearray 40 | int idx = 0; 41 | int candidate = 1; 42 | do { 43 | candidate += 1; 44 | if (isPrime(candidate)) { 45 | primearray[idx] = candidate; 46 | idx++; 47 | } 48 | } while (idx < P); 49 | 50 | while (cnt <= 500) { 51 | n++; 52 | n1 = n; 53 | if (n1 % 2 == 0) 54 | n1 /= 2; 55 | Dn1 = 1; 56 | for (int i = 0; i < P; i++) { 57 | if (primearray[i] * primearray[i] > n1) { 58 | Dn1 *= 2; 59 | break; 60 | /* 61 | * When the prime divisor would be greater than the residual n1, 62 | * that residual n1 is the last prime factor with an exponent=1. 63 | * No necessity to identify it. 64 | */ 65 | } 66 | exponent = 1; 67 | while (n1 % primearray[i] == 0) { 68 | exponent++; 69 | n1 /= primearray[i]; 70 | } 71 | if (exponent > 1) 72 | Dn1 *= exponent; 73 | if (n1 == 1) 74 | break; 75 | } 76 | cnt = Dn * Dn1; 77 | Dn = Dn1; 78 | } 79 | printf("%ld\n", n * (n - 1) / 2); 80 | } 81 | -------------------------------------------------------------------------------- /C/12.Highly_divisible_triangular_number/prajwal-naik.c: -------------------------------------------------------------------------------- 1 | //Euler 12 2 | 3 | #include 4 | #include 5 | int divisorCount(int ); 6 | 7 | int main() 8 | { 9 | int counter=1; 10 | while(1) 11 | { 12 | int tn=((counter*(counter+1))/2); 13 | int res=divisorCount(tn); 14 | counter+=1; 15 | if(res>500) 16 | { 17 | printf("%d", tn); 18 | break; 19 | } 20 | } 21 | } 22 | 23 | int divisorCount(int n) 24 | { 25 | int count =0; 26 | for(int i=1; i<=sqrt(n); i++) 27 | { 28 | if(n%i==0) 29 | { 30 | if(n/i==i) 31 | count+=1; 32 | else 33 | count+=2; 34 | } 35 | } 36 | return count; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /C/2. Even Fibonacci numbers/even_fibonacci.c: -------------------------------------------------------------------------------- 1 | /* Project Euler problem 2: Even Fibonacci numbers */ 2 | #include 3 | 4 | int 5 | main () 6 | { 7 | int sum; 8 | int a; 9 | int b; 10 | int tmp; 11 | 12 | a = 1; 13 | b = 2; 14 | sum = 0; 15 | while (b < 4000000) { 16 | if (b % 2 == 0) 17 | sum += b; 18 | tmp = a + b; 19 | a = b; 20 | b = tmp; 21 | } 22 | 23 | printf("%d\n", sum); 24 | } 25 | -------------------------------------------------------------------------------- /C/28.Number_spiral_diagonal/pranshu2610.c: -------------------------------------------------------------------------------- 1 | // Project Euler : Problem Number 28 2 | 3 | // Starting with the number 1 and moving to the right in a 4 | // clockwise direction a 5 by 5 spiral is formed as follows: 5 | 6 | // 21 22 23 24 25 7 | // 20 7 8 9 10 8 | // 19 6 1 2 11 9 | // 18 5 4 3 12 10 | // 17 16 15 14 13 11 | 12 | // It can be verified that the sum of the numbers on the diagonals is 101. 13 | // What is the sum of the numbers on the diagonals in a 1001 by 1001 14 | // spiral formed in the same way? 15 | 16 | 17 | #include 18 | #include 19 | void main() 20 | { 21 | int lim=1002001; 22 | int i=1,j=1,c=1; 23 | int leftInc=0,rigInc=0; 24 | int Lsum=0,Rsum=0; 25 | //Left Diagonal 26 | while(i 5 | #include 6 | #include 7 | #include 8 | 9 | #define LIMIT 1000000 10 | 11 | static bool is_prime(int x) 12 | { 13 | int y = 5; 14 | 15 | if (x <= 3) 16 | return true; 17 | else if ((x % 2 == 0) || (x % 3 == 0)) 18 | return false; 19 | while ((y * y) <= x) { 20 | if ((x % y == 0) || (x % (y + 2) == 0)) 21 | return false; 22 | y += 6; 23 | } 24 | return true; 25 | } 26 | 27 | static void prime_tab(void) 28 | { 29 | int *prime_tab = calloc(LIMIT / 4, sizeof(int)); 30 | int length = 0; 31 | 32 | for (int x = 2; x < LIMIT; x++) 33 | if (is_prime(x)) { 34 | prime_tab[length] = x; 35 | length++; 36 | } 37 | prime_tab[length] = -1; 38 | 39 | int *sum_tab = calloc(length + 1, sizeof(int)); 40 | 41 | sum_tab[0] = 0; 42 | length = 0; 43 | for (int x = 0; sum_tab[x] < LIMIT; x++) { 44 | sum_tab[x + 1] = sum_tab[x] + prime_tab[x]; 45 | length++; 46 | } 47 | 48 | int res = 0; 49 | int temp_res = 0; 50 | int diff = 0; 51 | int temp_diff = 0; 52 | for (int x = length; x > 0; x--) { 53 | for (int y = 0; y < length; y++) { 54 | temp_res = sum_tab[x] - sum_tab[y]; 55 | temp_diff = x - y; 56 | if (temp_res > LIMIT) 57 | break; 58 | if (is_prime(temp_res) && (temp_diff > diff)) { 59 | res = temp_res; 60 | diff = temp_diff; 61 | } 62 | } 63 | } 64 | printf("The biggest sum of consecutive primes is: %d\nWith: %d consecutive primes.\n", res, diff); 65 | } 66 | 67 | int main(void) 68 | { 69 | prime_tab(); 70 | return 0; 71 | } -------------------------------------------------------------------------------- /C/README.md: -------------------------------------------------------------------------------- 1 | Add C files here 2 | -------------------------------------------------------------------------------- /CPP/04.Largest_palindrome_product/pranshu2610.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RisingLight/Project-Euler/34294949853213adddc42d10705c3846bf6afab0/CPP/04.Largest_palindrome_product/pranshu2610.cpp -------------------------------------------------------------------------------- /CPP/06. Sum Square Difference/xcyberpunkx0.cpp: -------------------------------------------------------------------------------- 1 | /* Project Euler Question 6 2 | Code by xcyberpunkx0 3 | */ 4 | 5 | #include 6 | #include 7 | using namespace std; 8 | 9 | int main(){ 10 | long n=100,m,a,s; 11 | 12 | a =(n * (n + 1) * (2*n + 1) )/ 6; //Sum of Squares of 100 natural numbers 13 | m = (n * (n + 1)) / 2; //Sum of first 100 Natural Numbers 14 | s = m*m; //Square of Sum of first 100 natural numbers 15 | 16 | cout<<"Difference between the Sum of the Squares of the 1st 100 natural numbers and the square of the sum is : "< 2 | 3 | using namespace std; 4 | int main(){ 5 | int c; 6 | for (int a=1;a<=1000;a++){ 7 | for(int b=1;b<=1000;b++){ 8 | c=1000-a-b; 9 | if (a 2 | #define MAXS 1000007 3 | 4 | using namespace std; 5 | 6 | typedef vector vi; 7 | bool visited[MAXS]; 8 | 9 | /** 10 | * k is wich prime number you want to get. 11 | * 12 | * This function looks for prime numbers 13 | * between 1 and MAXS, passing as a parameter 14 | * which prime number you want to get. The 15 | * function returns -1 if the kth prime number 16 | * is not between 1 and MAXS. 17 | * */ 18 | int sieveOfEratosthenes10001st(int k) { 19 | int result = -1; 20 | int countOfPrimes = 0; 21 | 22 | bool found = false; 23 | int j; int i = 2; 24 | while(i < MAXS && !found) { 25 | 26 | if(!visited[i]){ 27 | countOfPrimes++; 28 | 29 | if(countOfPrimes == k) { 30 | result = i; 31 | found = true; 32 | } else { 33 | j = 2; 34 | 35 | while(j * i < MAXS) { 36 | visited[j*i] = true; 37 | j++; 38 | } 39 | } 40 | } 41 | 42 | i++; 43 | } 44 | 45 | return result; 46 | } 47 | 48 | 49 | int main() { 50 | 51 | cout << sieveOfEratosthenes10001st(10001) << endl; 52 | 53 | return 0; 54 | } 55 | -------------------------------------------------------------------------------- /CPP/28.Number_spiral_diagonal/pranshu2610.cpp: -------------------------------------------------------------------------------- 1 | // Project Euler : Problem Number 28 2 | 3 | // Starting with the number 1 and moving to the right in a 4 | // clockwise direction a 5 by 5 spiral is formed as follows: 5 | 6 | // 21 22 23 24 25 7 | // 20 7 8 9 10 8 | // 19 6 1 2 11 9 | // 18 5 4 3 12 10 | // 17 16 15 14 13 11 | 12 | // It can be verified that the sum of the numbers on the diagonals is 101. 13 | // What is the sum of the numbers on the diagonals in a 1001 by 1001 14 | // spiral formed in the same way? 15 | 16 | 17 | #include 18 | using namespace std; 19 | int main() 20 | { 21 | int lim=1002001; 22 | int i=1,j=1,c=1; 23 | int leftInc=0,rigInc=0; 24 | int Lsum=0,Rsum=0; 25 | //Left Diagonal 26 | while(i 9 | #include 10 | using namespace std; 11 | int countSolutions(int p) 12 | { 13 | int count = 0; 14 | for (int a = 1; a <= p; a++) { 15 | for (int b = a; b <= p; b++) { 16 | int c = p - a - b; 17 | if (b <= c && a * a + b * b == c * c) //Condition to check if the triangle satisifies the pythagoras formula 18 | count++; 19 | } 20 | } 21 | return count; 22 | } 23 | string run() 24 | { 25 | int maxPerimeter = 0; //Initial default values 26 | int maxTriangles = 0; // Set to 0 so that it get overwritten by any value grt 0 27 | 28 | for (int p = 1; p <= 1000; p++) { //Bruteforce from 1 to 1000 29 | int triangles = countSolutions(p); 30 | if (triangles > maxTriangles) { //If the number of solutions found are more than the current max than replacement occurs 31 | maxTriangles = triangles; 32 | maxPerimeter = p; 33 | } 34 | } 35 | return to_string(maxPerimeter); 36 | } 37 | 38 | int main() 39 | { 40 | cout< 4 | 5 | using namespace std; 6 | 7 | long long lcm(long long,long long); 8 | long long hcf(long long,long long); 9 | 10 | long long lcm(long long x,long long y){ 11 | 12 | long lcm; 13 | lcm=(x*y)/hcf(x,y); 14 | 15 | return lcm; 16 | } 17 | 18 | 19 | long long hcf(long long x,long long y){ 20 | 21 | while(x!=y){ 22 | if(x>y){ x=x-y; } 23 | else { y=y-x;} } 24 | return x; 25 | 26 | } 27 | 28 | 29 | 30 | 31 | 32 | int main(){ 33 | 34 | long a=1; 35 | 36 | for(long i=11;i<=20;i++){ 37 | a=lcm(a,i); 38 | 39 | 40 | } 41 | 42 | cout<<"LCM "< 3 | using namespace std; 4 | 5 | void fibo() 6 | { long input=0,num1=0,num2=1,i=0,count; // giving default values 7 | 8 | cout<<" Enter the limit for the number of output from the series:- "; 9 | cin>>input; 10 | for(i=0,count=0;i 2 | using namespace std; 3 | 4 | int main() 5 | { 6 | lpf(); 7 | return 0; 8 | } 9 | 10 | void lpf() 11 | {int num1,num2,i,oldn=1,newn=0; 12 | cout<<" Enter the 2 numbers you want to find the largest prime factor "; 13 | 14 | cin>>num; 15 | num2=sqrt(num); 16 | for(i=1;inewn) 20 | { newn=i} 21 | } 22 | 23 | } 24 | cout<<"\n The largest prime number is "< 2 | 3 | using namespace std; 4 | 5 | void mul35(); 6 | 7 | int main(void) 8 | { 9 | mul35(); 10 | return 0; 11 | } 12 | 13 | 14 | void mul35() 15 | { 16 | cout<<" 100 numbers will be displayed :-\n"; 17 | int i; 18 | for(i=1;i<=100;i++) 19 | { 20 | cout<<" "<1) 21 | { 22 | if(n%t == 0 && isPrime(t)) 23 | { 24 | prime = t; 25 | break; 26 | } 27 | t--; 28 | } 29 | return prime; 30 | } 31 | 32 | 33 | void main() { 34 | 35 | 36 | print("Largest Factor 0f 600851475143 is "); 37 | print(largestFactor()); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Dart/05.Sum Square Difference/sum_square_diff_akarshsingh9.dart: -------------------------------------------------------------------------------- 1 | int sumOfSquares(int n) 2 | { 3 | int twon = 2*n; 4 | int prod = n*(n+1)*(twon+1); 5 | int result = (prod/6).floor(); 6 | return result; 7 | } 8 | 9 | int sumOfn(int n) 10 | { 11 | int prod = n*(n+1); 12 | int result = (prod/2).floor(); 13 | return result; 14 | } 15 | 16 | void main() { 17 | int n = 100; 18 | int s = sumOfSquares(n); 19 | int s1 = sumOfn(n); 20 | int s2 = s1*s1; 21 | int res = s2 - s; 22 | print("Sum of Squares of first $n natural numbers: $s"); 23 | print("Square of Sum of first $n natural numbers: $s2"); 24 | print("Result is $res"); 25 | } 26 | -------------------------------------------------------------------------------- /Dart/07.10001st_Prime/akarshsingh9.dart: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Problem 07: 10001st Prime 4 | * Using Sieve of Eratosthene to filter out the prime numbers 5 | * program will keep a counter to count number of primes 6 | * once the counter reaches the 10001 7 | * program will return the prime number at this counter 8 | */ 9 | int sieveOfE(int number) 10 | { 11 | var visited = new List.filled(10000007,false); 12 | int res = 0; 13 | int primecount = 0; 14 | bool found = false; 15 | int i = 2, j; 16 | while(i < 10000007 && !found) 17 | { 18 | if(!visited[i]) 19 | { 20 | primecount++; 21 | if(primecount == number) 22 | { 23 | res = i; 24 | found = true; 25 | } 26 | else{ 27 | j = 2; 28 | while(j*i < 10000007) 29 | { 30 | visited[j*i] = true; 31 | j++; 32 | } 33 | } 34 | 35 | } 36 | i++; 37 | } 38 | return res; 39 | } 40 | void main() { 41 | print(sieveOfE(10001)); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /Dart/README.md: -------------------------------------------------------------------------------- 1 | Add Dart files here 2 | -------------------------------------------------------------------------------- /Go Lang/01.Multiples_of_3_and_5/mehran75.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | func main() { 4 | 5 | maxNumber := 1000 6 | 7 | sum := 0 8 | for i := 0; i < maxNumber; i++ { 9 | if i%3 == 0 || i%5 == 0 { 10 | sum += i 11 | } 12 | } 13 | 14 | println(sum) 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Go Lang/02.Even_Fibonacci_numbers/mehran75.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | func main() { 4 | 5 | fibs := fibonacci([]int{1, 2}, 1, 2, 2) 6 | 7 | sum := 0 8 | for _, item := range fibs { 9 | if item%2 == 0 { 10 | sum += item 11 | } 12 | } 13 | 14 | println(sum) 15 | 16 | } 17 | 18 | func fibonacci(fib []int, n1, n2, index int) []int { 19 | 20 | if fib[len(fib)-1] > 4000000 { 21 | return fib[:len(fib)-1] 22 | } 23 | 24 | fib = append(fib, fib[index-1]+fib[index-2]) 25 | 26 | return fibonacci(fib, fib[index-1], fib[index-2], index+1) 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Go Lang/03.largest_prime_factor/mehran75.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | num := 600851475143 7 | fmt.Println(sieveOfEratosthenes(num)) 8 | } 9 | 10 | func sieveOfEratosthenes(N int) (prime int) { 11 | prime = 0 12 | for i := 2; i < N; i++ { 13 | if b[i] == true { 14 | continue 15 | } 16 | if i > prime { 17 | prime = i 18 | } 19 | for k := i * i; k < N; k += i { 20 | b[k] = true 21 | } 22 | } 23 | return 24 | } 25 | -------------------------------------------------------------------------------- /Go Lang/04.largest_palindrome_product/pancakem.go: -------------------------------------------------------------------------------- 1 | // Problem 4 2 | // A palindromic number reads the same both ways. 3 | // The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. 4 | 5 | // Find the largest palindrome made from the product of two 3-digit numbers. 6 | 7 | package main 8 | 9 | import ( 10 | "fmt" 11 | "strconv" 12 | ) 13 | 14 | func reverse(s string) string { 15 | runes := []rune(s) 16 | for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 { 17 | runes[i], runes[j] = runes[j], runes[i] 18 | } 19 | return string(runes) 20 | } 21 | 22 | func isPalindrome(number int) bool { 23 | strNumber := strconv.Itoa(number) 24 | reversedStrNumber := reverse(strNumber) 25 | 26 | return strNumber == reversedStrNumber 27 | } 28 | 29 | func main() { 30 | 31 | result := 0 32 | temp := 0 33 | 34 | for i := 999; i > 0; i-- { 35 | for j := 999; j > 0; j-- { 36 | temp = i * j 37 | // is palindrome and is larger than the previous result 38 | if isPalindrome(temp) && temp > result { 39 | result = temp 40 | } 41 | } 42 | } 43 | 44 | fmt.Println(result) 45 | } 46 | -------------------------------------------------------------------------------- /Go Lang/05.Smallest_multiple/jdbr99.go: -------------------------------------------------------------------------------- 1 | // Euler 05. Smallest Multiple 2 | // 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. 3 | // What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? 4 | 5 | package main 6 | 7 | import ( 8 | "fmt" 9 | ) 10 | 11 | func main() { 12 | // We set the number to find the multiples of 13 | num := 20 14 | // We set a flag to indicate when the number is found 15 | flag := true 16 | // We create an array of the numbers which we want to check if the number is multiple of 17 | check := [20]int{20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1} 18 | // We iterate until the flag is changed to `false` 19 | for flag { 20 | // We iterate checking if each number in the `check` array is multiple of `num` 21 | for i, n := range check { 22 | // If any number is not a multiple, then we change `num` to be the next multiple of the biggest number 23 | if num%n != 0 { 24 | num += check[0] 25 | break 26 | } 27 | // If every number was a multiple, then we raise the flag, since we've now found the number 28 | if i == len(check)-1 { 29 | flag = false 30 | break 31 | } 32 | } 33 | } 34 | // We print the found number 35 | fmt.Println(num) 36 | } 37 | -------------------------------------------------------------------------------- /Go Lang/06.sum_square_difference/pancakem.go: -------------------------------------------------------------------------------- 1 | // Problem 6 2 | // The sum of the squares of the first ten natural numbers is, 3 | // 4 | // 12 + 22 + ... + 102 = 385 5 | // The square of the sum of the first ten natural numbers is, 6 | 7 | // (1 + 2 + ... + 10)2 = 552 = 3025 8 | // Hence the difference between the sum of the squares of 9 | // the first ten natural numbers and the square of the sum is 3025 − 385 = 2640. 10 | 11 | // Find the difference between the sum of the squares of 12 | // the first one hundred natural numbers and the square of the sum. 13 | 14 | package main 15 | 16 | import "fmt" 17 | 18 | func generateXNo(x int) []int { 19 | numbers := make([]int, 0) 20 | for i := 1; i < x+1; i++ { 21 | numbers = append(numbers, i) 22 | } 23 | return numbers 24 | } 25 | 26 | func sumOfSquareFirstXNo(number int) int { 27 | numbers := generateXNo(number) 28 | sum := 0 29 | for _, element := range numbers { 30 | sum += element * element 31 | } 32 | return sum 33 | } 34 | 35 | func squareOfSumOfFirstXNo(number int) int { 36 | numbers := generateXNo(number) 37 | sum := 0 38 | for _, element := range numbers { 39 | sum += element 40 | } 41 | return sum * sum 42 | } 43 | 44 | func main() { 45 | fmt.Println(squareOfSumOfFirstXNo(100) - sumOfSquareFirstXNo(100)) 46 | } 47 | -------------------------------------------------------------------------------- /Go Lang/50.Consecutive_prime_sum/ValentinDSJ.go: -------------------------------------------------------------------------------- 1 | //Euler 50.Consecutive_prime_sum in Go 2 | package main 3 | 4 | import "fmt" 5 | 6 | const limit int = 1000000 7 | 8 | func is_prime(x int) (res bool) { 9 | y := 5 10 | 11 | if x <= 3 { 12 | return true 13 | } else if (x % 2) == 0 || (x % 3) == 0 { 14 | return false 15 | } 16 | for (y * y) <= x { 17 | if (x % y) == 0 || (x % (y + 2)) == 0 { 18 | return false 19 | } 20 | y += 6; 21 | } 22 | return true 23 | } 24 | 25 | func solver() (res int, diff int) { 26 | prime_tab := []int{} 27 | 28 | for x := 2; x < limit; x++ { 29 | if (is_prime(x)) { 30 | prime_tab = append(prime_tab, x) 31 | } 32 | } 33 | 34 | sum_tab := []int{0} 35 | 36 | for x := 0; sum_tab[x] < limit; x++ { 37 | sum_tab = append(sum_tab, sum_tab[x] + prime_tab[x]) 38 | } 39 | 40 | res = 0 41 | diff = 0 42 | temp_res := 0 43 | temp_diff := 0 44 | for x := len(sum_tab) - 1; x > 0; x-- { 45 | for y := 0; y < len(sum_tab); y++ { 46 | temp_res = sum_tab[x] - sum_tab[y] 47 | temp_diff = x - y 48 | if temp_res > limit { 49 | break; 50 | } 51 | if is_prime(temp_res) && temp_diff > diff { 52 | res = temp_res 53 | diff = temp_diff 54 | } 55 | } 56 | } 57 | 58 | return 59 | } 60 | 61 | func main() { 62 | x, y := solver() 63 | fmt.Printf("The biggest sum of consecutive primes is %d\nWith %d consecutive primes.", x, y) 64 | } 65 | -------------------------------------------------------------------------------- /Go Lang/README.md: -------------------------------------------------------------------------------- 1 | Add Go lang files here 2 | -------------------------------------------------------------------------------- /JS/01.Multiples_of_3_and_5/Higor_Snt.js: -------------------------------------------------------------------------------- 1 | function sumMultiplesOf3And5(limit) { 2 | let result = 0; 3 | 4 | for (let i = 3; i < limit; i++) { 5 | if ((i % 3 == 0) || (i % 5 == 0)) { 6 | result += i; 7 | } 8 | } 9 | 10 | alert(result); 11 | } -------------------------------------------------------------------------------- /JS/02.Even_Fibonacci_Numbers/Matheus_Muriel.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Each new term in the Fibonacci sequence is generated 3 | * by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 4 | * 5 | * 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... 6 | * 7 | * By considering the terms in the Fibonacci sequence 8 | * whose values do not exceed four million, find the sum of the even-valued terms. 9 | */ 10 | 11 | function EvenFibonacciNumber (){ 12 | evenFibs = new Array(); 13 | 14 | lastFib = 0; 15 | i = 1; 16 | sumOfFibs = 0; 17 | while (true) { 18 | fibAux = calculateFib(i); 19 | i++; 20 | 21 | if (fibAux > 4000000) { 22 | break; 23 | } 24 | 25 | if (isEven(fibAux)) { 26 | lastFib = fibAux; 27 | evenFibs.push(fibAux); 28 | sumOfFibs += fibAux 29 | } 30 | } 31 | 32 | alert(sumOfFibs) 33 | } 34 | 35 | function calculateFib (n) { 36 | if (n <= 2) { 37 | return 1; 38 | } else { 39 | return calculateFib(n-1) + calculateFib(n-2) 40 | } 41 | } 42 | 43 | function isEven (number) { 44 | if (number % 2 == 0) { 45 | return true; 46 | } else { 47 | return false; 48 | } 49 | } -------------------------------------------------------------------------------- /JS/03.Largest_Prime_Factor/Higor_Snt.js: -------------------------------------------------------------------------------- 1 | function largestPrimeFactor (){ 2 | let number = 600851475143; 3 | 4 | let index = Math.floor(Math.sqrt(number)); 5 | 6 | while (index > 1) { 7 | if (number % index == 0 && isPrime(index)) { 8 | alert(index); 9 | break; 10 | } 11 | index--; 12 | } 13 | } 14 | 15 | function isPrime (number) { 16 | let result = true; 17 | 18 | for (let i = 2; i < Math.floor(Math.sqrt(number)); i++) { 19 | if (number % i == 0){ 20 | result = false; 21 | break; 22 | } 23 | } 24 | return result; 25 | } -------------------------------------------------------------------------------- /JS/04.Largest_Palindrome_Product/Matheus_Muriel.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A palindromic number reads the same both ways. 3 | * The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. 4 | * Find the largest palindrome made from the product of two 3-digit numbers. 5 | */ 6 | 7 | function LargestPalindromeProduct () { 8 | maxNumberFinded = 0; 9 | for (let i = 111; i < 999; i++) { 10 | for (let j = 111; j < 999; j++) { 11 | let product = i * j; 12 | if (isPalindrome(product) && product >= maxNumberFinded) { 13 | maxNumberFinded = product; 14 | } 15 | } 16 | } 17 | alert(maxNumberFinded) 18 | } 19 | 20 | function isPalindrome (number) { 21 | let strNumber = number.toString(); 22 | let strReverseNumber = reverse(strNumber); 23 | 24 | if (strNumber === strReverseNumber) { 25 | return true; 26 | } else { 27 | return false; 28 | } 29 | } 30 | 31 | function reverse (stringToReverse) { 32 | arrayOfStr = stringToReverse.split(""); 33 | 34 | reverseOfArray = arrayOfStr.reverse(); 35 | 36 | strOfReverse = reverseOfArray.join(""); 37 | 38 | return strOfReverse; 39 | } -------------------------------------------------------------------------------- /JS/README.md: -------------------------------------------------------------------------------- 1 | Add JS files here 2 | -------------------------------------------------------------------------------- /JS/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Solutions 7 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 |

Solutions

41 |
42 | 43 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Java/04.Largest_Palindrome_Product/anubhavm55.java: -------------------------------------------------------------------------------- 1 | //Euler Problem_04 2 | //This solution will find largest palindrome product made from two 3-digit numbers 3 | import java.io.*; 4 | import java.util.*; 5 | import java.text.*; 6 | import java.math.*; 7 | import java.util.regex.*; 8 | 9 | public class Solution { 10 | 11 | public static void main(String[] args) { 12 | Scanner in = new Scanner(System.in); 13 | int t = 1; 14 | int i,j,len,a0,n,f; 15 | int x,y; 16 | String s; 17 | z:for(a0 = 0; a0 < t; a0++){ 18 | n = 1000000; 19 | for(i=n-1;i>=101101;i--) 20 | { 21 | f=0; 22 | s=Integer.toString(i); 23 | len=s.length(); 24 | for(j=0;j=100)&&((i/x)<=999)) 38 | { 39 | System.out.println(i); 40 | continue z; 41 | } 42 | } 43 | } 44 | } 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Java/1.Multiples of 3 and 5/Multiples.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | 3 | public class Multiples{ 4 | public static void main(String[] args) 5 | { 6 | Scanner in = new Scanner(System.in); 7 | 8 | int numberOfTimes= in.nextInt(); 9 | 10 | for(int i=0; i<= numberOfTimes; i++) 11 | { 12 | if(i%3==0 || i%5==0) 13 | System.out.println(i); 14 | } 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Java/16.Power Digit Sum/pragyanmehrotra.java: -------------------------------------------------------------------------------- 1 | //Euler 16 power digit sum done in java 2 | import java.math.BigInteger; 3 | 4 | public class pragyanmehrotra{ 5 | public static void main(String[] args) { 6 | BigInteger d = new BigInteger("2"); 7 | BigInteger n = d.pow(1000); 8 | String sn = n.toString(); 9 | int ans = 0; 10 | for(int i = 0;i maxN) { 31 | maxN = currentMax; 32 | maxA = a; 33 | maxB = b; 34 | } 35 | } 36 | } 37 | 38 | return maxA * maxB; 39 | } 40 | 41 | public static int findMaxN(int a, int b) { 42 | 43 | int max = 0; 44 | int n = 2; 45 | 46 | while (isPrime(n*n + a*n + b)) { 47 | if (n > max) 48 | max = n++; 49 | } 50 | 51 | return max; 52 | } 53 | 54 | public static boolean isPrime(int input) { 55 | 56 | if (input == 2) 57 | return true; 58 | if (input <= 1) 59 | return false; 60 | if (input % 2 == 0) 61 | return false; 62 | 63 | /** 64 | * Only up to the square root. 65 | * If there exists a factor between input and sqrt(input) 66 | * then that value will have a corresponding factor between 3 and sqrt(input) 67 | */ 68 | for (int i = input - 2; i >= Math.sqrt(input); i -= 2) { 69 | if (input % i == 0) 70 | return false; 71 | } 72 | 73 | return true; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Java/28.Number spiral diagonals/danmoren.java: -------------------------------------------------------------------------------- 1 | /* 2 | Project Euler - 28 3 | */ 4 | public class Exercise28 { 5 | 6 | public static void main (String[] args) { 7 | 8 | long startTime = System.currentTimeMillis(); 9 | 10 | final int limit = 1001; 11 | int sum; 12 | int size; 13 | int corner, diff; 14 | sum=1; 15 | 16 | for (size=3; size<=limit; size+=2) { 17 | corner = size*size; 18 | diff = size - 1; 19 | sum += 4 * corner - 6 * diff; 20 | } 21 | System.out.println(sum); 22 | 23 | long endTime = System.currentTimeMillis(); 24 | System.out.println("Program finished in " + (endTime - startTime) + " milliseconds"); 25 | } 26 | } -------------------------------------------------------------------------------- /Java/3.Largest Prime Factor/LargestPrime.java: -------------------------------------------------------------------------------- 1 | 2 | import java.util.Scanner; 3 | 4 | public class LargestPrime { 5 | public static void main(String args[]) { 6 | Scanner in = new Scanner(System.in); 7 | int largestPrime = 0; 8 | int number = in.nextInt(); 9 | for (int j = 2; j < number; j++) { 10 | if (number % j == 0 & isPrime(j)) { 11 | largestPrime = j; 12 | } 13 | } 14 | 15 | System.out.println(largestPrime); 16 | } 17 | 18 | private static boolean isPrime(int j) { 19 | for (int i =2; i maxTriangles) { //If the number of solutions found are more than the current max than replacement occurs 17 | maxTriangles = triangles; 18 | maxPerimeter = p; 19 | } 20 | } 21 | return Integer.toString(maxPerimeter); 22 | } 23 | 24 | private static int countSolutions(int p) { 25 | int count = 0; 26 | for (int a = 1; a <= p; a++) { 27 | for (int b = a; b <= p; b++) { 28 | int c = p - a - b; 29 | if (b <= c && a * a + b * b == c * c) //Condition to check if the triangle satisifies the pythagoras formula 30 | count++; 31 | } 32 | } 33 | return count; 34 | } 35 | } -------------------------------------------------------------------------------- /Java/6.Sum Square Difference/mucahidcelik.java: -------------------------------------------------------------------------------- 1 | //Euler Problem_6 2 | public class mucahidcelik{ 3 | public static void main(String []args){ 4 | int sumSquares=0, squareSum=0; 5 | for(int i = 1; i <= 100; i++ ){ 6 | sumSquares += i * i; 7 | squareSum += i; 8 | } 9 | squareSum *= squareSum; 10 | System.out.println(squareSum - sumSquares); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Java/6.Sum Square Difference/pragyanmehrotra.java: -------------------------------------------------------------------------------- 1 | //Euler 6 Sum square difference done in Java 2 | 3 | import java.math.BigInteger; 4 | 5 | public class pragyanmehrotra { 6 | 7 | public static void main(String[] args) { 8 | BigInteger sum = new BigInteger("0"); 9 | BigInteger sumOfSquares = new BigInteger("0"); 10 | for(BigInteger i = new BigInteger("1");!i.equals(new BigInteger("101"));i = i.add(new BigInteger("1"))){ 11 | sum = sum.add(i); 12 | sumOfSquares = sumOfSquares.add(i.multiply(i)); 13 | } 14 | BigInteger squareOfSum = sum.multiply(sum); 15 | BigInteger diff = squareOfSum.subtract(sumOfSquares); 16 | System.out.println(diff); 17 | } 18 | } -------------------------------------------------------------------------------- /Java/README.md: -------------------------------------------------------------------------------- 1 | Add Java files here 2 | -------------------------------------------------------------------------------- /Kotlin/1.MultiplesOf3and5.kt: -------------------------------------------------------------------------------- 1 | 2 | fun main(args: Array){ 3 | 4 | var numberofTimes= readLine()!!.toInt() 5 | for (i in 1..numberofTimes) 6 | { 7 | if(i%3==0 && i%5==0) 8 | println(i) 9 | } 10 | 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Kotlin/2.EvenFibonacci.kt: -------------------------------------------------------------------------------- 1 | fun main(args: Array) { 2 | var firstNumber = 0 3 | var secondNumber = 1 4 | var i = 0 5 | var sum:Int 6 | println("Enter number of terms: ") 7 | val numberOfTimes = readLine()!!.toInt() 8 | while (i != numberOfTimes) { 9 | sum = firstNumber + secondNumber 10 | if (sum % 2 == 0) { 11 | i++ 12 | System.out.println(sum) 13 | } 14 | firstNumber = secondNumber 15 | secondNumber = sum 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Kotlin/20.Factorial_digit_sum/bartonstanly.kt: -------------------------------------------------------------------------------- 1 | /* 2 | Project Euler Question 20. Factorial digit sum 3 | 4 | Problem Statement: 5 | 6 | n! means n × (n − 1) × ... × 3 × 2 × 1 7 | For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800, 8 | and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. 9 | 10 | Find the sum of the digits in the number 100! 11 | */ 12 | 13 | import java.math.BigInteger 14 | 15 | fun factorial(n: BigInteger): BigInteger { 16 | return when (n) { 17 | BigInteger.ONE, BigInteger.ZERO -> BigInteger.ONE 18 | else -> n.multiply(factorial(n.minus(BigInteger.ONE))) 19 | } 20 | } 21 | 22 | fun main() { 23 | var sum = 0 24 | val factorialString = factorial(BigInteger("100")).toString() 25 | val len = factorialString.length 26 | for (i in 0..len-1) { 27 | sum = sum + factorialString.substring(i, i+1).toInt() 28 | } 29 | println(sum) 30 | } 31 | -------------------------------------------------------------------------------- /Kotlin/README.md: -------------------------------------------------------------------------------- 1 | Add Kotlin files here 2 | -------------------------------------------------------------------------------- /Python/07.10001st_prime/Vipul-Bajaj.py: -------------------------------------------------------------------------------- 1 | # Euler 7 2 | # Problem Name - 10001st_prime 3 | # Description - Print the 10001st Prime Number 4 | 5 | # Maximum number upto which you can query. 6 | MAX = 10000007 7 | # Function to return nth prime number if between 1 and MAX range, returns the nth prime number if 1 <= n < MAX otherwise None 8 | def return_nth_prime(n): 9 | prime = [True for i in range(MAX+1)] 10 | p = 2 11 | prime_till_now = 0 12 | found = False 13 | ans = None 14 | while (p < MAX and not found): 15 | if (prime[p] == True): 16 | prime_till_now+=1 17 | if prime_till_now == n: 18 | ans = p 19 | found = True 20 | for i in range(p * p, MAX+1, p): 21 | prime[i] = False 22 | p += 1 23 | return ans 24 | 25 | if __name__ == "__main__": 26 | print(return_nth_prime(10001)) # Will print 10001st prime number 27 | -------------------------------------------------------------------------------- /Python/1. Multiples of 3 and 5/multiples.py: -------------------------------------------------------------------------------- 1 | def sum_multiples_of_3_and_5(limit): 2 | result = 0 3 | 4 | for number in range(3, limit): 5 | if ((number % 3 == 0) or (number % 5 == 0)): 6 | result += number 7 | 8 | return result 9 | 10 | print(sum_multiples_of_3_and_5(1000)) -------------------------------------------------------------------------------- /Python/1. Multiples of 3 and 5/multiples_3_and_5.py: -------------------------------------------------------------------------------- 1 | def sum(): 2 | summ=0 3 | for i in range(1000): 4 | if i%3 ==0 or i%5==0: 5 | summ+=i 6 | return summ 7 | 8 | if __name__ == "__main__": 9 | print(sum()) 10 | -------------------------------------------------------------------------------- /Python/10. Summation of primes/Artyko.py: -------------------------------------------------------------------------------- 1 | """Euler 10""" 2 | import math 3 | 4 | 5 | def is_prime(n: int) -> bool: 6 | if n % 2 == 0 and n > 2: 7 | return False 8 | return all(n % j for j in range(3, int(math.sqrt(n)) + 1, 2)) 9 | 10 | 11 | if __name__ == "__main__": 12 | results = 0 13 | for i in range(2, 2000001): 14 | if is_prime(i): 15 | results += i 16 | print(results) 17 | -------------------------------------------------------------------------------- /Python/11. Largest Product in Grid/av-arvind77.py: -------------------------------------------------------------------------------- 1 | from numpy import * 2 | 3 | filename = 'euler11.txt' 4 | 5 | with open(filename, "r") as ins: 6 | array = [] 7 | for line in ins: 8 | array.append(line) 9 | print(array) 10 | newArray = [] 11 | for i in array: 12 | j = i.split(' ') 13 | k = [int(n) for n in j] 14 | newArray.append(k) 15 | print(newArray) 16 | 17 | problemMatrix = matrix(newArray) 18 | print(problemMatrix) 19 | 20 | maxProd = 1 21 | 22 | for i in range(16): 23 | for j in range(16): 24 | prod1 = problemMatrix[i,j]*problemMatrix[i+1,j]*problemMatrix[i+2,j]*problemMatrix[i+3,j] 25 | if prod1 > maxProd: 26 | maxProd = prod1 27 | prod2 = problemMatrix[i,j]*problemMatrix[i,j+1]*problemMatrix[i,j+2]*problemMatrix[i,j+3] 28 | if prod2 > maxProd: 29 | maxProd = prod2 30 | prod3 = problemMatrix[i,j]*problemMatrix[i+1,j+1]*problemMatrix[i+2,j+2]*problemMatrix[i+3,j+3] 31 | if prod3 > maxProd: 32 | maxProd = prod3 33 | prod4 = problemMatrix[19-i,j]*problemMatrix[18-i,j+1]*problemMatrix[17-i,j+2]*problemMatrix[16-i,j+3] 34 | if prod4 > maxProd: 35 | maxProd = prod4 36 | print(maxProd) -------------------------------------------------------------------------------- /Python/11. Largest Product in Grid/euler11.txt: -------------------------------------------------------------------------------- 1 | 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 2 | 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 3 | 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 4 | 52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 5 | 22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80 6 | 24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 7 | 32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 8 | 67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 9 | 24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72 10 | 21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95 11 | 78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 12 | 16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 13 | 86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58 14 | 19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40 15 | 04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66 16 | 88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 17 | 04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36 18 | 20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16 19 | 20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54 20 | 01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48 -------------------------------------------------------------------------------- /Python/12. Highly_divisible_triangular_number/ankitRai96.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Author: ankitRai96 3 | Problem: find the value of the first triangle number to 4 | have over five hundred divisors 5 | ''' 6 | from math import sqrt 7 | 8 | def divisorCount(n): 9 | count = 0 10 | for i in range(1,int(sqrt(n))+1): 11 | if n%i == 0: 12 | if n/i == i: 13 | count = count + 1 14 | else: 15 | count = count + 2 16 | return count 17 | 18 | if __name__ == '__main__': 19 | counter = 1 20 | while True: 21 | tn = (counter * (counter+1))//2 22 | res = divisorCount(tn) 23 | counter = counter + 1 24 | if res > 500: 25 | print(tn) 26 | break -------------------------------------------------------------------------------- /Python/13. Large sum/jac08h.py: -------------------------------------------------------------------------------- 1 | """ 2 | Problem 13 - Large Sum 3 | """ 4 | 5 | def first_digits_of_sum(number:str, n_digits:int) -> str: 6 | s = 0 7 | for y, i in enumerate(number.split()): 8 | s += int(i) 9 | 10 | return str(s)[:n_digits] 11 | 12 | x = """ 13 | 37107287533902102798797998220837590246510135740250 14 | 46376937677490009712648124896970078050417018260538 15 | 74324986199524741059474233309513058123726617309629 16 | 91942213363574161572522430563301811072406154908250 17 | 23067588207539346171171980310421047513778063246676 18 | 89261670696623633820136378418383684178734361726757 19 | 28112879812849979408065481931592621691275889832738 20 | 44274228917432520321923589422876796487670272189318 21 | 47451445736001306439091167216856844588711603153276 22 | 70386486105843025439939619828917593665686757934951 23 | 62176457141856560629502157223196586755079324193331 24 | 64906352462741904929101432445813822663347944758178 25 | 92575867718337217661963751590579239728245598838407 26 | 58203565325359399008402633568948830189458628227828 27 | 80181199384826282014278194139940567587151170094390 28 | 35398664372827112653829987240784473053190104293586 29 | 86515506006295864861532075273371959191420517255829 30 | 71693888707715466499115593487603532921714970056938 31 | 54370070576826684624621495650076471787294438377604 32 | 53282654108756828443191190634694037855217779295145 33 | 36123272525000296071075082563815656710885258350721 34 | 45876576172410976447339110607218265236877223636045 35 | 17423706905851860660448207621209813287860733969412 36 | 81142660418086830619328460811191061556940512689692 37 | 51934325451728388641918047049293215058642563049483 38 | 62467221648435076201727918039944693004732956340691 39 | 15732444386908125794514089057706229429197107928209 40 | 55037687525678773091862540744969844508330393682126 41 | 18336384825330154686196124348767681297534375946515 42 | 80386287592878490201521685554828717201219257766954 43 | 78182833757993103614740356856449095527097864797581 44 | 16726320100436897842553539920931837441497806860984 45 | 48403098129077791799088218795327364475675590848030 46 | 87086987551392711854517078544161852424320693150332 47 | 59959406895756536782107074926966537676326235447210 48 | 69793950679652694742597709739166693763042633987085 49 | 41052684708299085211399427365734116182760315001271 50 | 65378607361501080857009149939512557028198746004375 51 | 35829035317434717326932123578154982629742552737307 52 | 94953759765105305946966067683156574377167401875275 53 | 88902802571733229619176668713819931811048770190271 54 | 25267680276078003013678680992525463401061632866526 55 | 36270218540497705585629946580636237993140746255962 56 | 24074486908231174977792365466257246923322810917141 57 | 91430288197103288597806669760892938638285025333403 58 | 34413065578016127815921815005561868836468420090470 59 | 23053081172816430487623791969842487255036638784583 60 | 11487696932154902810424020138335124462181441773470 61 | 63783299490636259666498587618221225225512486764533 62 | 67720186971698544312419572409913959008952310058822 63 | 95548255300263520781532296796249481641953868218774 64 | 76085327132285723110424803456124867697064507995236 65 | 37774242535411291684276865538926205024910326572967 66 | 23701913275725675285653248258265463092207058596522 67 | 29798860272258331913126375147341994889534765745501 68 | 18495701454879288984856827726077713721403798879715 69 | 38298203783031473527721580348144513491373226651381 70 | 34829543829199918180278916522431027392251122869539 71 | 40957953066405232632538044100059654939159879593635 72 | 29746152185502371307642255121183693803580388584903 73 | 41698116222072977186158236678424689157993532961922 74 | 62467957194401269043877107275048102390895523597457 75 | 23189706772547915061505504953922979530901129967519 76 | 86188088225875314529584099251203829009407770775672 77 | 11306739708304724483816533873502340845647058077308 78 | 82959174767140363198008187129011875491310547126581 79 | 97623331044818386269515456334926366572897563400500 80 | 42846280183517070527831839425882145521227251250327 81 | 55121603546981200581762165212827652751691296897789 82 | 32238195734329339946437501907836945765883352399886 83 | 75506164965184775180738168837861091527357929701337 84 | 62177842752192623401942399639168044983993173312731 85 | 32924185707147349566916674687634660915035914677504 86 | 99518671430235219628894890102423325116913619626622 87 | 73267460800591547471830798392868535206946944540724 88 | 76841822524674417161514036427982273348055556214818 89 | 97142617910342598647204516893989422179826088076852 90 | 87783646182799346313767754307809363333018982642090 91 | 10848802521674670883215120185883543223812876952786 92 | 71329612474782464538636993009049310363619763878039 93 | 62184073572399794223406235393808339651327408011116 94 | 66627891981488087797941876876144230030984490851411 95 | 60661826293682836764744779239180335110989069790714 96 | 85786944089552990653640447425576083659976645795096 97 | 66024396409905389607120198219976047599490197230297 98 | 64913982680032973156037120041377903785566085089252 99 | 16730939319872750275468906903707539413042652315011 100 | 94809377245048795150954100921645863754710598436791 101 | 78639167021187492431995700641917969777599028300699 102 | 15368713711936614952811305876380278410754449733078 103 | 40789923115535562561142322423255033685442488917353 104 | 44889911501440648020369068063960672322193204149535 105 | 41503128880339536053299340368006977710650566631954 106 | 81234880673210146739058568557934581403627822703280 107 | 82616570773948327592232845941706525094512325230608 108 | 22918802058777319719839450180888072429661980811197 109 | 77158542502016545090413245809786882778948721859617 110 | 72107838435069186155435662884062257473692284509516 111 | 20849603980134001723930671666823555245252804609722 112 | 53503534226472524250874054075591789781264330331690 113 | """ 114 | print(first_digits_of_sum(x, 10)) -------------------------------------------------------------------------------- /Python/13. Large sum/ramonssarmento.py: -------------------------------------------------------------------------------- 1 | #Euler Problem_13 2 | 3 | inputs = """37107287533902102798797998220837590246510135740250 4 | 46376937677490009712648124896970078050417018260538 5 | 74324986199524741059474233309513058123726617309629 6 | 91942213363574161572522430563301811072406154908250 7 | 23067588207539346171171980310421047513778063246676 8 | 89261670696623633820136378418383684178734361726757 9 | 28112879812849979408065481931592621691275889832738 10 | 44274228917432520321923589422876796487670272189318 11 | 47451445736001306439091167216856844588711603153276 12 | 70386486105843025439939619828917593665686757934951 13 | 62176457141856560629502157223196586755079324193331 14 | 64906352462741904929101432445813822663347944758178 15 | 92575867718337217661963751590579239728245598838407 16 | 58203565325359399008402633568948830189458628227828 17 | 80181199384826282014278194139940567587151170094390 18 | 35398664372827112653829987240784473053190104293586 19 | 86515506006295864861532075273371959191420517255829 20 | 71693888707715466499115593487603532921714970056938 21 | 54370070576826684624621495650076471787294438377604 22 | 53282654108756828443191190634694037855217779295145 23 | 36123272525000296071075082563815656710885258350721 24 | 45876576172410976447339110607218265236877223636045 25 | 17423706905851860660448207621209813287860733969412 26 | 81142660418086830619328460811191061556940512689692 27 | 51934325451728388641918047049293215058642563049483 28 | 62467221648435076201727918039944693004732956340691 29 | 15732444386908125794514089057706229429197107928209 30 | 55037687525678773091862540744969844508330393682126 31 | 18336384825330154686196124348767681297534375946515 32 | 80386287592878490201521685554828717201219257766954 33 | 78182833757993103614740356856449095527097864797581 34 | 16726320100436897842553539920931837441497806860984 35 | 48403098129077791799088218795327364475675590848030 36 | 87086987551392711854517078544161852424320693150332 37 | 59959406895756536782107074926966537676326235447210 38 | 69793950679652694742597709739166693763042633987085 39 | 41052684708299085211399427365734116182760315001271 40 | 65378607361501080857009149939512557028198746004375 41 | 35829035317434717326932123578154982629742552737307 42 | 94953759765105305946966067683156574377167401875275 43 | 88902802571733229619176668713819931811048770190271 44 | 25267680276078003013678680992525463401061632866526 45 | 36270218540497705585629946580636237993140746255962 46 | 24074486908231174977792365466257246923322810917141 47 | 91430288197103288597806669760892938638285025333403 48 | 34413065578016127815921815005561868836468420090470 49 | 23053081172816430487623791969842487255036638784583 50 | 11487696932154902810424020138335124462181441773470 51 | 63783299490636259666498587618221225225512486764533 52 | 67720186971698544312419572409913959008952310058822 53 | 95548255300263520781532296796249481641953868218774 54 | 76085327132285723110424803456124867697064507995236 55 | 37774242535411291684276865538926205024910326572967 56 | 23701913275725675285653248258265463092207058596522 57 | 29798860272258331913126375147341994889534765745501 58 | 18495701454879288984856827726077713721403798879715 59 | 38298203783031473527721580348144513491373226651381 60 | 34829543829199918180278916522431027392251122869539 61 | 40957953066405232632538044100059654939159879593635 62 | 29746152185502371307642255121183693803580388584903 63 | 41698116222072977186158236678424689157993532961922 64 | 62467957194401269043877107275048102390895523597457 65 | 23189706772547915061505504953922979530901129967519 66 | 86188088225875314529584099251203829009407770775672 67 | 11306739708304724483816533873502340845647058077308 68 | 82959174767140363198008187129011875491310547126581 69 | 97623331044818386269515456334926366572897563400500 70 | 42846280183517070527831839425882145521227251250327 71 | 55121603546981200581762165212827652751691296897789 72 | 32238195734329339946437501907836945765883352399886 73 | 75506164965184775180738168837861091527357929701337 74 | 62177842752192623401942399639168044983993173312731 75 | 32924185707147349566916674687634660915035914677504 76 | 99518671430235219628894890102423325116913619626622 77 | 73267460800591547471830798392868535206946944540724 78 | 76841822524674417161514036427982273348055556214818 79 | 97142617910342598647204516893989422179826088076852 80 | 87783646182799346313767754307809363333018982642090 81 | 10848802521674670883215120185883543223812876952786 82 | 71329612474782464538636993009049310363619763878039 83 | 62184073572399794223406235393808339651327408011116 84 | 66627891981488087797941876876144230030984490851411 85 | 60661826293682836764744779239180335110989069790714 86 | 85786944089552990653640447425576083659976645795096 87 | 66024396409905389607120198219976047599490197230297 88 | 64913982680032973156037120041377903785566085089252 89 | 16730939319872750275468906903707539413042652315011 90 | 94809377245048795150954100921645863754710598436791 91 | 78639167021187492431995700641917969777599028300699 92 | 15368713711936614952811305876380278410754449733078 93 | 40789923115535562561142322423255033685442488917353 94 | 44889911501440648020369068063960672322193204149535 95 | 41503128880339536053299340368006977710650566631954 96 | 81234880673210146739058568557934581403627822703280 97 | 82616570773948327592232845941706525094512325230608 98 | 22918802058777319719839450180888072429661980811197 99 | 77158542502016545090413245809786882778948721859617 100 | 72107838435069186155435662884062257473692284509516 101 | 20849603980134001723930671666823555245252804609722 102 | 53503534226472524250874054075591789781264330331690""" 103 | 104 | sum_of_inputs = sum(map(int,inputs.split())) 105 | print(str(sum_of_inputs)[:10]) 106 | -------------------------------------------------------------------------------- /Python/13. Large sum/vrindaaa.py: -------------------------------------------------------------------------------- 1 | #Euler Problem 13 done in Python3 2 | s = '''37107287533902102798797998220837590246510135740250 3 | 46376937677490009712648124896970078050417018260538 4 | 74324986199524741059474233309513058123726617309629 5 | 91942213363574161572522430563301811072406154908250 6 | 23067588207539346171171980310421047513778063246676 7 | 89261670696623633820136378418383684178734361726757 8 | 28112879812849979408065481931592621691275889832738 9 | 44274228917432520321923589422876796487670272189318 10 | 47451445736001306439091167216856844588711603153276 11 | 70386486105843025439939619828917593665686757934951 12 | 62176457141856560629502157223196586755079324193331 13 | 64906352462741904929101432445813822663347944758178 14 | 92575867718337217661963751590579239728245598838407 15 | 58203565325359399008402633568948830189458628227828 16 | 80181199384826282014278194139940567587151170094390 17 | 35398664372827112653829987240784473053190104293586 18 | 86515506006295864861532075273371959191420517255829 19 | 71693888707715466499115593487603532921714970056938 20 | 54370070576826684624621495650076471787294438377604 21 | 53282654108756828443191190634694037855217779295145 22 | 36123272525000296071075082563815656710885258350721 23 | 45876576172410976447339110607218265236877223636045 24 | 17423706905851860660448207621209813287860733969412 25 | 81142660418086830619328460811191061556940512689692 26 | 51934325451728388641918047049293215058642563049483 27 | 62467221648435076201727918039944693004732956340691 28 | 15732444386908125794514089057706229429197107928209 29 | 55037687525678773091862540744969844508330393682126 30 | 18336384825330154686196124348767681297534375946515 31 | 80386287592878490201521685554828717201219257766954 32 | 78182833757993103614740356856449095527097864797581 33 | 16726320100436897842553539920931837441497806860984 34 | 48403098129077791799088218795327364475675590848030 35 | 87086987551392711854517078544161852424320693150332 36 | 59959406895756536782107074926966537676326235447210 37 | 69793950679652694742597709739166693763042633987085 38 | 41052684708299085211399427365734116182760315001271 39 | 65378607361501080857009149939512557028198746004375 40 | 35829035317434717326932123578154982629742552737307 41 | 94953759765105305946966067683156574377167401875275 42 | 88902802571733229619176668713819931811048770190271 43 | 25267680276078003013678680992525463401061632866526 44 | 36270218540497705585629946580636237993140746255962 45 | 24074486908231174977792365466257246923322810917141 46 | 91430288197103288597806669760892938638285025333403 47 | 34413065578016127815921815005561868836468420090470 48 | 23053081172816430487623791969842487255036638784583 49 | 11487696932154902810424020138335124462181441773470 50 | 63783299490636259666498587618221225225512486764533 51 | 67720186971698544312419572409913959008952310058822 52 | 95548255300263520781532296796249481641953868218774 53 | 76085327132285723110424803456124867697064507995236 54 | 37774242535411291684276865538926205024910326572967 55 | 23701913275725675285653248258265463092207058596522 56 | 29798860272258331913126375147341994889534765745501 57 | 18495701454879288984856827726077713721403798879715 58 | 38298203783031473527721580348144513491373226651381 59 | 34829543829199918180278916522431027392251122869539 60 | 40957953066405232632538044100059654939159879593635 61 | 29746152185502371307642255121183693803580388584903 62 | 41698116222072977186158236678424689157993532961922 63 | 62467957194401269043877107275048102390895523597457 64 | 23189706772547915061505504953922979530901129967519 65 | 86188088225875314529584099251203829009407770775672 66 | 11306739708304724483816533873502340845647058077308 67 | 82959174767140363198008187129011875491310547126581 68 | 97623331044818386269515456334926366572897563400500 69 | 42846280183517070527831839425882145521227251250327 70 | 55121603546981200581762165212827652751691296897789 71 | 32238195734329339946437501907836945765883352399886 72 | 75506164965184775180738168837861091527357929701337 73 | 62177842752192623401942399639168044983993173312731 74 | 32924185707147349566916674687634660915035914677504 75 | 99518671430235219628894890102423325116913619626622 76 | 73267460800591547471830798392868535206946944540724 77 | 76841822524674417161514036427982273348055556214818 78 | 97142617910342598647204516893989422179826088076852 79 | 87783646182799346313767754307809363333018982642090 80 | 10848802521674670883215120185883543223812876952786 81 | 71329612474782464538636993009049310363619763878039 82 | 62184073572399794223406235393808339651327408011116 83 | 66627891981488087797941876876144230030984490851411 84 | 60661826293682836764744779239180335110989069790714 85 | 85786944089552990653640447425576083659976645795096 86 | 66024396409905389607120198219976047599490197230297 87 | 64913982680032973156037120041377903785566085089252 88 | 16730939319872750275468906903707539413042652315011 89 | 94809377245048795150954100921645863754710598436791 90 | 78639167021187492431995700641917969777599028300699 91 | 15368713711936614952811305876380278410754449733078 92 | 40789923115535562561142322423255033685442488917353 93 | 44889911501440648020369068063960672322193204149535 94 | 41503128880339536053299340368006977710650566631954 95 | 81234880673210146739058568557934581403627822703280 96 | 82616570773948327592232845941706525094512325230608 97 | 22918802058777319719839450180888072429661980811197 98 | 77158542502016545090413245809786882778948721859617 99 | 72107838435069186155435662884062257473692284509516 100 | 20849603980134001723930671666823555245252804609722 101 | 53503534226472524250874054075591789781264330331690''' 102 | z = s.split("\n") 103 | k = 0 104 | for i in z: 105 | k += int(i) 106 | print(str(k)[:10]) -------------------------------------------------------------------------------- /Python/16. Power digit sum/PowerDigitSum.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Project Euler Challenger 16. Power digit sum 3 | What is the sum of the digits of the number 2^1000? 4 | ''' 5 | 6 | # Fast Exponentiation 7 | def binPow(a, b): 8 | power = 1 9 | 10 | while b > 0: 11 | 12 | if b & 1: 13 | power = power * a 14 | 15 | a = a * a 16 | b >>= 1 17 | 18 | return power 19 | 20 | 21 | power_digit = str(binPow(2, 1000)) 22 | 23 | sum = 0 24 | for digit in power_digit: 25 | sum += int(digit) 26 | 27 | print(sum) 28 | -------------------------------------------------------------------------------- /Python/16. Power digit sum/vrindaaa.py: -------------------------------------------------------------------------------- 1 | # Euler Problem 16 done in Python3 2 | x = pow(2, 1000) 3 | s = 0 4 | while(x>0): 5 | s+=x%10 6 | x=x//10 7 | print(s) -------------------------------------------------------------------------------- /Python/17.Number_letter_counts/prajwal-naik.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Fri Oct 18 19:26:19 2019 4 | 5 | @author: Prajwal 6 | """ 7 | #Euler 17 8 | 9 | numbers=[i for i in range(1, 1001)] 10 | ones={1:'one', 2:'two', 3:'three', 4:'four', 5:'five', 6:'six', 7:'seven', 8:'eight', 9:'nine'} 11 | tens={1:'ten', 2:'twenty', 3:'thirty', 4:'forty', 5:'fifty', 6:'sixty', 7:'seventy', 8:'eighty', 9:'ninety'} 12 | tens_ones={11: 'eleven', 12: 'twelve', 13: 'thirteen', 14: 'fourteen', 15: 'fifteen', 16: 'sixteen', 17: 'seventeen', 18: 'eighteen', 19: 'nineteen'} 13 | spellings=[] 14 | 15 | 16 | for i in range(len(numbers)): 17 | numbers[i]=str(numbers[i]) 18 | for i in range(len(numbers)): 19 | #for numbers from 1-9 20 | if(len(numbers[i])==1): 21 | spellings.append(ones[int(numbers[i])]) 22 | 23 | 24 | 25 | 26 | #for numbers from 10-99 27 | elif(len(numbers[i])==2): 28 | if(numbers[i][1]=='0'): 29 | spellings.append(tens[int(numbers[i][0])]) 30 | else: 31 | if(int(numbers[i]) in tens_ones.keys()): 32 | spellings.append(tens_ones[int(numbers[i])]) 33 | else: 34 | n=int(numbers[i]) 35 | tenth=int(n/10); 36 | units=n%10; 37 | string=tens[tenth]+ones[units] 38 | spellings.append(string) 39 | 40 | 41 | 42 | 43 | #for numbers from 100-999 44 | elif((len(numbers[i])==3)): 45 | if((numbers[i][2]=='0') and (numbers[i][1]=='0')): 46 | string=ones[int(numbers[i][0])]+'hundred' 47 | spellings.append(string) 48 | else: 49 | n=int(numbers[i]) 50 | hundredth=int(n/100) 51 | tenth=int((n/10)%10) 52 | units=(n%100)%10 53 | string=ones[hundredth]+'hundred'+'and' 54 | if(int(numbers[i][1:]) in tens_ones.keys()): 55 | string+=tens_ones[int(numbers[i][1:])] 56 | elif(int(numbers[i][1])==0): 57 | string+=ones[int(numbers[i][2])] 58 | elif(numbers[i][2]=='0'): 59 | string+=tens[int(numbers[i][1])] 60 | else: 61 | string+=tens[tenth]+ones[units] 62 | spellings.append(string) 63 | 64 | spellings.append('onethousand') 65 | 66 | str_len=0 67 | for i in range(len(spellings)): 68 | str_len+=len(spellings[i]) 69 | print("Total letters used : ", str_len) 70 | 71 | 72 | 73 | #print(numbers) 74 | -------------------------------------------------------------------------------- /Python/18. Maximum path sum I/ramonssarmento.py: -------------------------------------------------------------------------------- 1 | #Euler Problem_18 2 | 3 | def calc(l,index,line): 4 | if line >= len(l) or index > line or index < 0: 5 | return 0 6 | value = int(l[line].split()[index]) 7 | left = value + calc(l,index,line+1) 8 | right = value + calc(l,index+1,line+1) 9 | return left if left > right else right 10 | 11 | 12 | 13 | 14 | inputs = """75 15 | 95 64 16 | 17 47 82 17 | 18 35 87 10 18 | 20 04 82 47 65 19 | 19 01 23 75 03 34 20 | 88 02 77 73 07 63 67 21 | 99 65 04 28 06 16 70 92 22 | 41 41 26 56 83 40 80 70 33 23 | 41 48 72 33 47 32 37 16 94 29 24 | 53 71 44 65 25 43 91 52 97 51 14 25 | 70 11 33 28 77 73 17 78 39 68 17 57 26 | 91 71 52 38 17 14 91 43 58 50 27 29 48 27 | 63 66 04 68 89 53 67 30 73 16 69 87 40 31 28 | 04 62 98 27 23 09 70 98 73 93 38 53 60 04 23""" 29 | 30 | lines = inputs.split("\n") 31 | print(calc(lines,0,0)) 32 | #best path: 75 + 64 + 82 + 87 + 82 + 75 + 73 + 28 + 83 + 32 + 91 + 78 + 58 + 73 + 93 = 1074 33 | -------------------------------------------------------------------------------- /Python/2. Even Fibonacci numbers/even_fibonacci.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Project Euler Challenge 02. Even Fibonacci numbers 3 | Problem Statement: Find the sum of even numbers in fibonacci series which is less than 40000000 4 | ''' 5 | 6 | def fibo_sum(): #The function that returns the sum 7 | 8 | temp = 0 #Variable that helps in swapping the current number into the previous number variable 9 | pre = 1 #Variable that store the previous value of the fibonacci series 10 | even_sum = 0 #Variable that store the sum 11 | i=0 #Variable that itterates to generate new elements in the series 12 | 13 | while i <= 4000000: #Loop to generate new numbers starts 14 | 15 | if i<=1: #Handelling cases when the series has the elements 0 and 1 16 | i+=1 #Incrementing the values of 'i' by 1 and no swapping of 'prev' with 'i' 17 | 18 | else: #If the number is greater that 1 19 | temp = i #Storing 'i' to 'temp' for swapping 20 | i += pre #creating new fibonacci element 21 | pre = temp #Updating the 'pre' with the value stored in 'temp' i.e last value if 'i' before creating of new fibonacci element 22 | 23 | if i%2==0: #Checking if the element is even or not 24 | even_sum += i #If yes then add it to the sum 25 | 26 | return even_sum #Return the sum value 27 | 28 | print(fibo_sum()) #Testing the output -------------------------------------------------------------------------------- /Python/20. Factorial digit sum/jorgee97.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Project Euler Question 20. Factorial digit sum 3 | Problem Statement: 4 | n! means n × (n − 1) × ... × 3 × 2 × 1 5 | 6 | For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800, 7 | and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. 8 | 9 | Find the sum of the digits in the number 100! 10 | ''' 11 | import math 12 | 13 | def factorial_digit_sum(factorial_n): 14 | result = 0 15 | for n in str(factorial_n): 16 | result += int(n) 17 | 18 | return result 19 | 20 | if __name__ == "__main__": 21 | n = 100 22 | factorial_of_n = math.factorial(n) 23 | factorial_sum = factorial_digit_sum(factorial_of_n) 24 | print(factorial_sum) 25 | 26 | -------------------------------------------------------------------------------- /Python/20.Factorial digit sum/hkp27299.py: -------------------------------------------------------------------------------- 1 | def factorial(n): 2 | 3 | return 1 if (n==1 or n==0) else n * factorial(n - 1); 4 | 5 | n = int(input("Enter number = ")) 6 | 7 | answer = factorial(n) 8 | answer1 = list(map(int, str(answer))) 9 | ans = 0 10 | for i in answer1: 11 | ans += i 12 | print(ans) 13 | -------------------------------------------------------------------------------- /Python/20.Factorial digit sum/said3427.py: -------------------------------------------------------------------------------- 1 | # Euler 20. Factorial digit sum 2 | import math 3 | result=sum([int(x) for x in str(math.factorial(100))]) 4 | 5 | print(result) -------------------------------------------------------------------------------- /Python/20.Factorial digit sum/vrindaaa.py: -------------------------------------------------------------------------------- 1 | #Euler Problem 20 done in python3 2 | n = 100 3 | k = 1 4 | while(n>1): 5 | k *= n 6 | n -= 1 7 | s = 0 8 | while(k>0): 9 | s += k%10 10 | k = k//10 11 | print(s) -------------------------------------------------------------------------------- /Python/22.names_scores/Vipul-Bajaj.py: -------------------------------------------------------------------------------- 1 | # Euler 22 2 | def get_total_sum_of_names(names_file_path): 3 | name_file = open(names_file_path,"r") 4 | names = name_file.read() 5 | names = names.replace('\"','') 6 | names_list = names.split(",") 7 | names_list.sort() 8 | total_names_sum = 0 9 | for index,name in enumerate(names_list): 10 | name_sum = 0 11 | for ch in name: 12 | name_sum+=(ord(ch)-64) 13 | total_names_sum+=(name_sum*(index+1)) 14 | 15 | return total_names_sum 16 | 17 | if __name__ == "__main__": 18 | print(get_total_sum_of_names("p022_names.txt")) 19 | -------------------------------------------------------------------------------- /Python/25.1000-digit_Fibonacci_number/RodolfoFerro.py: -------------------------------------------------------------------------------- 1 | # Euler Problem 25 2 | 3 | def _fibo(): 4 | a, b, i = 1, 1, 1 5 | while True: 6 | yield a, i 7 | a, b, i = b, a + b, i + 1 8 | 9 | 10 | def main(n=1000): 11 | for f, i in _fibo(): 12 | if len(str(f)) == n: 13 | break 14 | print(i) 15 | 16 | 17 | if __name__ == '__main__': 18 | main() 19 | -------------------------------------------------------------------------------- /Python/28. Number spiral diagonals/said3427.py: -------------------------------------------------------------------------------- 1 | # Euler 28. Number spiral diagonals 2 | 3 | n=1001 4 | capas=int((n-1)/2) 5 | 6 | suma=1 7 | 8 | start=1 9 | for i in range(1,capas+1): 10 | for j in range(1,5): 11 | corner=start+2*i*j 12 | suma=suma+corner 13 | start=corner 14 | 15 | print(suma) -------------------------------------------------------------------------------- /Python/28.Number_spiral_diagonal/pranshu2610.py: -------------------------------------------------------------------------------- 1 | # Project Euler : Problem Number 28 2 | 3 | # Starting with the number 1 and moving to the right in a 4 | # clockwise direction a 5 by 5 spiral is formed as follows: 5 | 6 | # 21 22 23 24 25 7 | # 20 7 8 9 10 8 | # 19 6 1 2 11 9 | # 18 5 4 3 12 10 | # 17 16 15 14 13 11 | 12 | # It can be verified that the sum of the numbers on the diagonals is 101. 13 | # What is the sum of the numbers on the diagonals in a 1001 by 1001 14 | # spiral formed in the same way? 15 | 16 | lim=1002001 17 | i=1 18 | j=1 19 | c=1 20 | leftInc=0 21 | Lsum=0 22 | Rsum=0 23 | while(ithresh): #If the value of 'i' exceeds the 'thresh' value 14 | break #We stop because all the alternate factors have already been checked 15 | 16 | if is_factor(i) and is_prime(i): #Checking if the value if 'i' is the factor of 'number' and is prime or not 17 | max_prime_fac = i #If yes, assign 'i' value to 'max_prime_fac' 18 | thresh = number/i #Change the 'thresh' to the alternate factor of 'number' to that of 'i' 19 | 20 | return max_prime_fac #Return the largest prime factor value 21 | 22 | def is_factor(i): #Function that checks if the 'i' is a factor of 'number' or not 23 | return number%i == 0 #Returns the value in boolean 24 | 25 | def is_prime(i): #Function that checks if 'i' is prome or not 26 | 27 | count = 0 #Counter variable for checking prime 28 | 29 | for j in range(1,i+1): #Loop to check prime 30 | if(i%j==0): #If found a multiple 31 | count+=1 #Increment the counter by 1 32 | 33 | return count ==2 #Check and return if the counter == 2 i.e number is prime or not 34 | 35 | number=600851475143 #Variable thta contains the number according to the question 36 | print("Calculating...") #Message showing calculation in process 37 | print(largest_fact()) #Displaying the result 38 | print("END") #Disply end message -------------------------------------------------------------------------------- /Python/30. Digit fifth powers/said3427.py: -------------------------------------------------------------------------------- 1 | # Euler 30. Digit fifth powers 2 | 3 | result=0 4 | for i in range(2,1000000): 5 | sum=0 6 | for j in str(i): 7 | sum=sum+int(j)**5 8 | if sum==i: 9 | result+=i 10 | 11 | print(result) -------------------------------------------------------------------------------- /Python/31. Coin sums/kohzhixin.py: -------------------------------------------------------------------------------- 1 | coins = [1, 2, 5, 10, 20, 50, 100, 200] 2 | 3 | def solution(amt): 4 | ans = [0] * (amt + 1) 5 | ans[0] = 1 6 | for i in range(len(coins)): 7 | for j in range(coins[i], amt + 1): 8 | ans[j] += ans[j - coins[i]] 9 | return ans[-1] 10 | 11 | print(solution(200)) -------------------------------------------------------------------------------- /Python/35. Circular Prime/av.arvind77.py: -------------------------------------------------------------------------------- 1 | #EULER PROBLEM 35 - CIRCULAR PRIME 2 | import time 3 | start = time.time() 4 | 5 | def euler_35(n): 6 | is_prime = [True]*n 7 | is_prime[0] = False 8 | is_prime[1] = False 9 | is_prime[2] = True 10 | 11 | for i in range(3,int(n**0.5+1),2): 12 | index = i*2 13 | while index < n: 14 | is_prime[index] = False 15 | index = index+i 16 | prime = [2] 17 | for i in range(3,n,2): 18 | if is_prime[i]: 19 | prime.append(i) 20 | return prime 21 | 22 | primes = euler_35(1000000) 23 | 24 | counter = 0 25 | for i in primes: 26 | flag = True 27 | number = i/10 28 | while number: 29 | if (number%10) % 2 == 0 or (number%10)%5 == 0: 30 | flag = False 31 | break 32 | number //= 10 33 | if flag: 34 | length = len(str(i)) 35 | number = i 36 | counter += 1 37 | for j in range(length): 38 | number = (number%10)*10**(length-1)+number//10 39 | if number not in primes: 40 | counter -= 1 41 | break 42 | print(counter) 43 | end = time.time() 44 | print(end - start) -------------------------------------------------------------------------------- /Python/4. Largest palindrome product/largest_palin_product.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Project Euler Challenge 04. Largest palindrome product 3 | Problem Statement: Find the largest palindrome made from the product of two 3-digit numbers. 4 | ''' 5 | from datetime import datetime 6 | 7 | def largest_palin(): #Prints the largest palindrome made from the product of two 3-digit number 8 | 9 | start_time = datetime.now().microsecond #storing starting time 10 | 11 | lower_limit = 100*100 #Storing the smallest number that can be formed 12 | upper_limit = 999*999 #Storing the largest number that can be formed 13 | 14 | for i in range (upper_limit, lower_limit-1, -1): #Itterating backward loop 15 | if is_palin(i): #If its a palindrome number 16 | if got_factors(i): #And has two 3 digits factors 17 | print(i) #Print the number 18 | break #Break to loop to get just the largest number 19 | 20 | print("TOTAL TIME TAKEN: ",(datetime.now().microsecond-start_time)/1000) #Printing total time complexity (unit: ms) 21 | 22 | 23 | def is_palin(num): #Returns if the numer is palindrom or not 24 | temp = num #Storing in temporary variable to check the number later 25 | rev = 0 # Variable to store reverse of the number 26 | 27 | while num > 0: #Reversing the number 28 | rev = (rev*10) + (num%10) 29 | num = int(num/10) 30 | 31 | return rev == temp #Returning if the number is equal to its reverse or not 32 | 33 | def got_factors(number): #Function to check if the palindrome number has two 3 digit factors or not 34 | for j in range (100, 1000): #Loop to check factors 35 | if number%j==0: #If found a 3 digit factor 36 | if int(number/j)>=100 and int(number/j)<=999: #Check if its complementary factor is 3 digit or not 37 | print(j, " X ", int(number/j)) #IF yes, print them 38 | return True #And return True 39 | 40 | return False #If not, return False 41 | 42 | largest_palin() #Calling the function to find the largest palindrome with two 3 digit number -------------------------------------------------------------------------------- /Python/4. Largest palindrome product/palindrome_number.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Project Euler Challenger 4. Largest palindrome product 3 | Find the largest palindrome made from the product of two 3-digit numbers. 4 | ''' 5 | 6 | def is_pallindrome(n): 7 | 8 | s = str(n) 9 | for n in range(1, int(len(s)/2) + 1): 10 | 11 | if s[n-1] != s[-n]: 12 | return False 13 | 14 | return True 15 | 16 | 17 | largest = 0 18 | 19 | for j in range(100, 1000): 20 | for k in range(j, 1000): 21 | 22 | if is_pallindrome(j*k): 23 | 24 | if (j*k) > largest: largest = j*k 25 | 26 | print (largest) -------------------------------------------------------------------------------- /Python/40. Champernowne's constant/walkerdea.py: -------------------------------------------------------------------------------- 1 | #Euler Problem_40 2 | 3 | def getDigit(n): 4 | s = 0 5 | k = 0 6 | while s < n: 7 | r = s 8 | s += 9 * (10 ** k) * (k+1) 9 | k += 1 10 | h = n - r - 1 11 | t = 10 ** (k-1) + (h / k) 12 | pos = h % k 13 | return str(t)[pos] 14 | 15 | res = 1 16 | 17 | for i in range(7): 18 | res *= int(getDigit(10**i)) 19 | 20 | 21 | 22 | print(res) 23 | 24 | -------------------------------------------------------------------------------- /Python/41. Pandigital prime/Artyko.py: -------------------------------------------------------------------------------- 1 | import math 2 | import itertools 3 | 4 | 5 | def is_prime(n: int) -> bool: 6 | if n % 2 == 0 and n > 2: 7 | return False 8 | return all(n % j for j in range(3, int(math.sqrt(n)) + 1, 2)) 9 | 10 | 11 | if __name__ == "__main__": 12 | result = 0 13 | for i in list(itertools.permutations('1234567')): 14 | permutation_number = int("".join(i)) 15 | if is_prime(permutation_number): 16 | if result < permutation_number: 17 | result = permutation_number 18 | print(result) 19 | -------------------------------------------------------------------------------- /Python/42. Coded triangel numbers/Words.txt: -------------------------------------------------------------------------------- 1 | "A","ABILITY","ABLE","ABOUT","ABOVE","ABSENCE","ABSOLUTELY","ACADEMIC","ACCEPT","ACCESS","ACCIDENT","ACCOMPANY","ACCORDING","ACCOUNT","ACHIEVE","ACHIEVEMENT","ACID","ACQUIRE","ACROSS","ACT","ACTION","ACTIVE","ACTIVITY","ACTUAL","ACTUALLY","ADD","ADDITION","ADDITIONAL","ADDRESS","ADMINISTRATION","ADMIT","ADOPT","ADULT","ADVANCE","ADVANTAGE","ADVICE","ADVISE","AFFAIR","AFFECT","AFFORD","AFRAID","AFTER","AFTERNOON","AFTERWARDS","AGAIN","AGAINST","AGE","AGENCY","AGENT","AGO","AGREE","AGREEMENT","AHEAD","AID","AIM","AIR","AIRCRAFT","ALL","ALLOW","ALMOST","ALONE","ALONG","ALREADY","ALRIGHT","ALSO","ALTERNATIVE","ALTHOUGH","ALWAYS","AMONG","AMONGST","AMOUNT","AN","ANALYSIS","ANCIENT","AND","ANIMAL","ANNOUNCE","ANNUAL","ANOTHER","ANSWER","ANY","ANYBODY","ANYONE","ANYTHING","ANYWAY","APART","APPARENT","APPARENTLY","APPEAL","APPEAR","APPEARANCE","APPLICATION","APPLY","APPOINT","APPOINTMENT","APPROACH","APPROPRIATE","APPROVE","AREA","ARGUE","ARGUMENT","ARISE","ARM","ARMY","AROUND","ARRANGE","ARRANGEMENT","ARRIVE","ART","ARTICLE","ARTIST","AS","ASK","ASPECT","ASSEMBLY","ASSESS","ASSESSMENT","ASSET","ASSOCIATE","ASSOCIATION","ASSUME","ASSUMPTION","AT","ATMOSPHERE","ATTACH","ATTACK","ATTEMPT","ATTEND","ATTENTION","ATTITUDE","ATTRACT","ATTRACTIVE","AUDIENCE","AUTHOR","AUTHORITY","AVAILABLE","AVERAGE","AVOID","AWARD","AWARE","AWAY","AYE","BABY","BACK","BACKGROUND","BAD","BAG","BALANCE","BALL","BAND","BANK","BAR","BASE","BASIC","BASIS","BATTLE","BE","BEAR","BEAT","BEAUTIFUL","BECAUSE","BECOME","BED","BEDROOM","BEFORE","BEGIN","BEGINNING","BEHAVIOUR","BEHIND","BELIEF","BELIEVE","BELONG","BELOW","BENEATH","BENEFIT","BESIDE","BEST","BETTER","BETWEEN","BEYOND","BIG","BILL","BIND","BIRD","BIRTH","BIT","BLACK","BLOCK","BLOOD","BLOODY","BLOW","BLUE","BOARD","BOAT","BODY","BONE","BOOK","BORDER","BOTH","BOTTLE","BOTTOM","BOX","BOY","BRAIN","BRANCH","BREAK","BREATH","BRIDGE","BRIEF","BRIGHT","BRING","BROAD","BROTHER","BUDGET","BUILD","BUILDING","BURN","BUS","BUSINESS","BUSY","BUT","BUY","BY","CABINET","CALL","CAMPAIGN","CAN","CANDIDATE","CAPABLE","CAPACITY","CAPITAL","CAR","CARD","CARE","CAREER","CAREFUL","CAREFULLY","CARRY","CASE","CASH","CAT","CATCH","CATEGORY","CAUSE","CELL","CENTRAL","CENTRE","CENTURY","CERTAIN","CERTAINLY","CHAIN","CHAIR","CHAIRMAN","CHALLENGE","CHANCE","CHANGE","CHANNEL","CHAPTER","CHARACTER","CHARACTERISTIC","CHARGE","CHEAP","CHECK","CHEMICAL","CHIEF","CHILD","CHOICE","CHOOSE","CHURCH","CIRCLE","CIRCUMSTANCE","CITIZEN","CITY","CIVIL","CLAIM","CLASS","CLEAN","CLEAR","CLEARLY","CLIENT","CLIMB","CLOSE","CLOSELY","CLOTHES","CLUB","COAL","CODE","COFFEE","COLD","COLLEAGUE","COLLECT","COLLECTION","COLLEGE","COLOUR","COMBINATION","COMBINE","COME","COMMENT","COMMERCIAL","COMMISSION","COMMIT","COMMITMENT","COMMITTEE","COMMON","COMMUNICATION","COMMUNITY","COMPANY","COMPARE","COMPARISON","COMPETITION","COMPLETE","COMPLETELY","COMPLEX","COMPONENT","COMPUTER","CONCENTRATE","CONCENTRATION","CONCEPT","CONCERN","CONCERNED","CONCLUDE","CONCLUSION","CONDITION","CONDUCT","CONFERENCE","CONFIDENCE","CONFIRM","CONFLICT","CONGRESS","CONNECT","CONNECTION","CONSEQUENCE","CONSERVATIVE","CONSIDER","CONSIDERABLE","CONSIDERATION","CONSIST","CONSTANT","CONSTRUCTION","CONSUMER","CONTACT","CONTAIN","CONTENT","CONTEXT","CONTINUE","CONTRACT","CONTRAST","CONTRIBUTE","CONTRIBUTION","CONTROL","CONVENTION","CONVERSATION","COPY","CORNER","CORPORATE","CORRECT","COS","COST","COULD","COUNCIL","COUNT","COUNTRY","COUNTY","COUPLE","COURSE","COURT","COVER","CREATE","CREATION","CREDIT","CRIME","CRIMINAL","CRISIS","CRITERION","CRITICAL","CRITICISM","CROSS","CROWD","CRY","CULTURAL","CULTURE","CUP","CURRENT","CURRENTLY","CURRICULUM","CUSTOMER","CUT","DAMAGE","DANGER","DANGEROUS","DARK","DATA","DATE","DAUGHTER","DAY","DEAD","DEAL","DEATH","DEBATE","DEBT","DECADE","DECIDE","DECISION","DECLARE","DEEP","DEFENCE","DEFENDANT","DEFINE","DEFINITION","DEGREE","DELIVER","DEMAND","DEMOCRATIC","DEMONSTRATE","DENY","DEPARTMENT","DEPEND","DEPUTY","DERIVE","DESCRIBE","DESCRIPTION","DESIGN","DESIRE","DESK","DESPITE","DESTROY","DETAIL","DETAILED","DETERMINE","DEVELOP","DEVELOPMENT","DEVICE","DIE","DIFFERENCE","DIFFERENT","DIFFICULT","DIFFICULTY","DINNER","DIRECT","DIRECTION","DIRECTLY","DIRECTOR","DISAPPEAR","DISCIPLINE","DISCOVER","DISCUSS","DISCUSSION","DISEASE","DISPLAY","DISTANCE","DISTINCTION","DISTRIBUTION","DISTRICT","DIVIDE","DIVISION","DO","DOCTOR","DOCUMENT","DOG","DOMESTIC","DOOR","DOUBLE","DOUBT","DOWN","DRAW","DRAWING","DREAM","DRESS","DRINK","DRIVE","DRIVER","DROP","DRUG","DRY","DUE","DURING","DUTY","EACH","EAR","EARLY","EARN","EARTH","EASILY","EAST","EASY","EAT","ECONOMIC","ECONOMY","EDGE","EDITOR","EDUCATION","EDUCATIONAL","EFFECT","EFFECTIVE","EFFECTIVELY","EFFORT","EGG","EITHER","ELDERLY","ELECTION","ELEMENT","ELSE","ELSEWHERE","EMERGE","EMPHASIS","EMPLOY","EMPLOYEE","EMPLOYER","EMPLOYMENT","EMPTY","ENABLE","ENCOURAGE","END","ENEMY","ENERGY","ENGINE","ENGINEERING","ENJOY","ENOUGH","ENSURE","ENTER","ENTERPRISE","ENTIRE","ENTIRELY","ENTITLE","ENTRY","ENVIRONMENT","ENVIRONMENTAL","EQUAL","EQUALLY","EQUIPMENT","ERROR","ESCAPE","ESPECIALLY","ESSENTIAL","ESTABLISH","ESTABLISHMENT","ESTATE","ESTIMATE","EVEN","EVENING","EVENT","EVENTUALLY","EVER","EVERY","EVERYBODY","EVERYONE","EVERYTHING","EVIDENCE","EXACTLY","EXAMINATION","EXAMINE","EXAMPLE","EXCELLENT","EXCEPT","EXCHANGE","EXECUTIVE","EXERCISE","EXHIBITION","EXIST","EXISTENCE","EXISTING","EXPECT","EXPECTATION","EXPENDITURE","EXPENSE","EXPENSIVE","EXPERIENCE","EXPERIMENT","EXPERT","EXPLAIN","EXPLANATION","EXPLORE","EXPRESS","EXPRESSION","EXTEND","EXTENT","EXTERNAL","EXTRA","EXTREMELY","EYE","FACE","FACILITY","FACT","FACTOR","FACTORY","FAIL","FAILURE","FAIR","FAIRLY","FAITH","FALL","FAMILIAR","FAMILY","FAMOUS","FAR","FARM","FARMER","FASHION","FAST","FATHER","FAVOUR","FEAR","FEATURE","FEE","FEEL","FEELING","FEMALE","FEW","FIELD","FIGHT","FIGURE","FILE","FILL","FILM","FINAL","FINALLY","FINANCE","FINANCIAL","FIND","FINDING","FINE","FINGER","FINISH","FIRE","FIRM","FIRST","FISH","FIT","FIX","FLAT","FLIGHT","FLOOR","FLOW","FLOWER","FLY","FOCUS","FOLLOW","FOLLOWING","FOOD","FOOT","FOOTBALL","FOR","FORCE","FOREIGN","FOREST","FORGET","FORM","FORMAL","FORMER","FORWARD","FOUNDATION","FREE","FREEDOM","FREQUENTLY","FRESH","FRIEND","FROM","FRONT","FRUIT","FUEL","FULL","FULLY","FUNCTION","FUND","FUNNY","FURTHER","FUTURE","GAIN","GAME","GARDEN","GAS","GATE","GATHER","GENERAL","GENERALLY","GENERATE","GENERATION","GENTLEMAN","GET","GIRL","GIVE","GLASS","GO","GOAL","GOD","GOLD","GOOD","GOVERNMENT","GRANT","GREAT","GREEN","GREY","GROUND","GROUP","GROW","GROWING","GROWTH","GUEST","GUIDE","GUN","HAIR","HALF","HALL","HAND","HANDLE","HANG","HAPPEN","HAPPY","HARD","HARDLY","HATE","HAVE","HE","HEAD","HEALTH","HEAR","HEART","HEAT","HEAVY","HELL","HELP","HENCE","HER","HERE","HERSELF","HIDE","HIGH","HIGHLY","HILL","HIM","HIMSELF","HIS","HISTORICAL","HISTORY","HIT","HOLD","HOLE","HOLIDAY","HOME","HOPE","HORSE","HOSPITAL","HOT","HOTEL","HOUR","HOUSE","HOUSEHOLD","HOUSING","HOW","HOWEVER","HUGE","HUMAN","HURT","HUSBAND","I","IDEA","IDENTIFY","IF","IGNORE","ILLUSTRATE","IMAGE","IMAGINE","IMMEDIATE","IMMEDIATELY","IMPACT","IMPLICATION","IMPLY","IMPORTANCE","IMPORTANT","IMPOSE","IMPOSSIBLE","IMPRESSION","IMPROVE","IMPROVEMENT","IN","INCIDENT","INCLUDE","INCLUDING","INCOME","INCREASE","INCREASED","INCREASINGLY","INDEED","INDEPENDENT","INDEX","INDICATE","INDIVIDUAL","INDUSTRIAL","INDUSTRY","INFLUENCE","INFORM","INFORMATION","INITIAL","INITIATIVE","INJURY","INSIDE","INSIST","INSTANCE","INSTEAD","INSTITUTE","INSTITUTION","INSTRUCTION","INSTRUMENT","INSURANCE","INTEND","INTENTION","INTEREST","INTERESTED","INTERESTING","INTERNAL","INTERNATIONAL","INTERPRETATION","INTERVIEW","INTO","INTRODUCE","INTRODUCTION","INVESTIGATE","INVESTIGATION","INVESTMENT","INVITE","INVOLVE","IRON","IS","ISLAND","ISSUE","IT","ITEM","ITS","ITSELF","JOB","JOIN","JOINT","JOURNEY","JUDGE","JUMP","JUST","JUSTICE","KEEP","KEY","KID","KILL","KIND","KING","KITCHEN","KNEE","KNOW","KNOWLEDGE","LABOUR","LACK","LADY","LAND","LANGUAGE","LARGE","LARGELY","LAST","LATE","LATER","LATTER","LAUGH","LAUNCH","LAW","LAWYER","LAY","LEAD","LEADER","LEADERSHIP","LEADING","LEAF","LEAGUE","LEAN","LEARN","LEAST","LEAVE","LEFT","LEG","LEGAL","LEGISLATION","LENGTH","LESS","LET","LETTER","LEVEL","LIABILITY","LIBERAL","LIBRARY","LIE","LIFE","LIFT","LIGHT","LIKE","LIKELY","LIMIT","LIMITED","LINE","LINK","LIP","LIST","LISTEN","LITERATURE","LITTLE","LIVE","LIVING","LOAN","LOCAL","LOCATION","LONG","LOOK","LORD","LOSE","LOSS","LOT","LOVE","LOVELY","LOW","LUNCH","MACHINE","MAGAZINE","MAIN","MAINLY","MAINTAIN","MAJOR","MAJORITY","MAKE","MALE","MAN","MANAGE","MANAGEMENT","MANAGER","MANNER","MANY","MAP","MARK","MARKET","MARRIAGE","MARRIED","MARRY","MASS","MASTER","MATCH","MATERIAL","MATTER","MAY","MAYBE","ME","MEAL","MEAN","MEANING","MEANS","MEANWHILE","MEASURE","MECHANISM","MEDIA","MEDICAL","MEET","MEETING","MEMBER","MEMBERSHIP","MEMORY","MENTAL","MENTION","MERELY","MESSAGE","METAL","METHOD","MIDDLE","MIGHT","MILE","MILITARY","MILK","MIND","MINE","MINISTER","MINISTRY","MINUTE","MISS","MISTAKE","MODEL","MODERN","MODULE","MOMENT","MONEY","MONTH","MORE","MORNING","MOST","MOTHER","MOTION","MOTOR","MOUNTAIN","MOUTH","MOVE","MOVEMENT","MUCH","MURDER","MUSEUM","MUSIC","MUST","MY","MYSELF","NAME","NARROW","NATION","NATIONAL","NATURAL","NATURE","NEAR","NEARLY","NECESSARILY","NECESSARY","NECK","NEED","NEGOTIATION","NEIGHBOUR","NEITHER","NETWORK","NEVER","NEVERTHELESS","NEW","NEWS","NEWSPAPER","NEXT","NICE","NIGHT","NO","NOBODY","NOD","NOISE","NONE","NOR","NORMAL","NORMALLY","NORTH","NORTHERN","NOSE","NOT","NOTE","NOTHING","NOTICE","NOTION","NOW","NUCLEAR","NUMBER","NURSE","OBJECT","OBJECTIVE","OBSERVATION","OBSERVE","OBTAIN","OBVIOUS","OBVIOUSLY","OCCASION","OCCUR","ODD","OF","OFF","OFFENCE","OFFER","OFFICE","OFFICER","OFFICIAL","OFTEN","OIL","OKAY","OLD","ON","ONCE","ONE","ONLY","ONTO","OPEN","OPERATE","OPERATION","OPINION","OPPORTUNITY","OPPOSITION","OPTION","OR","ORDER","ORDINARY","ORGANISATION","ORGANISE","ORGANIZATION","ORIGIN","ORIGINAL","OTHER","OTHERWISE","OUGHT","OUR","OURSELVES","OUT","OUTCOME","OUTPUT","OUTSIDE","OVER","OVERALL","OWN","OWNER","PACKAGE","PAGE","PAIN","PAINT","PAINTING","PAIR","PANEL","PAPER","PARENT","PARK","PARLIAMENT","PART","PARTICULAR","PARTICULARLY","PARTLY","PARTNER","PARTY","PASS","PASSAGE","PAST","PATH","PATIENT","PATTERN","PAY","PAYMENT","PEACE","PENSION","PEOPLE","PER","PERCENT","PERFECT","PERFORM","PERFORMANCE","PERHAPS","PERIOD","PERMANENT","PERSON","PERSONAL","PERSUADE","PHASE","PHONE","PHOTOGRAPH","PHYSICAL","PICK","PICTURE","PIECE","PLACE","PLAN","PLANNING","PLANT","PLASTIC","PLATE","PLAY","PLAYER","PLEASE","PLEASURE","PLENTY","PLUS","POCKET","POINT","POLICE","POLICY","POLITICAL","POLITICS","POOL","POOR","POPULAR","POPULATION","POSITION","POSITIVE","POSSIBILITY","POSSIBLE","POSSIBLY","POST","POTENTIAL","POUND","POWER","POWERFUL","PRACTICAL","PRACTICE","PREFER","PREPARE","PRESENCE","PRESENT","PRESIDENT","PRESS","PRESSURE","PRETTY","PREVENT","PREVIOUS","PREVIOUSLY","PRICE","PRIMARY","PRIME","PRINCIPLE","PRIORITY","PRISON","PRISONER","PRIVATE","PROBABLY","PROBLEM","PROCEDURE","PROCESS","PRODUCE","PRODUCT","PRODUCTION","PROFESSIONAL","PROFIT","PROGRAM","PROGRAMME","PROGRESS","PROJECT","PROMISE","PROMOTE","PROPER","PROPERLY","PROPERTY","PROPORTION","PROPOSE","PROPOSAL","PROSPECT","PROTECT","PROTECTION","PROVE","PROVIDE","PROVIDED","PROVISION","PUB","PUBLIC","PUBLICATION","PUBLISH","PULL","PUPIL","PURPOSE","PUSH","PUT","QUALITY","QUARTER","QUESTION","QUICK","QUICKLY","QUIET","QUITE","RACE","RADIO","RAILWAY","RAIN","RAISE","RANGE","RAPIDLY","RARE","RATE","RATHER","REACH","REACTION","READ","READER","READING","READY","REAL","REALISE","REALITY","REALIZE","REALLY","REASON","REASONABLE","RECALL","RECEIVE","RECENT","RECENTLY","RECOGNISE","RECOGNITION","RECOGNIZE","RECOMMEND","RECORD","RECOVER","RED","REDUCE","REDUCTION","REFER","REFERENCE","REFLECT","REFORM","REFUSE","REGARD","REGION","REGIONAL","REGULAR","REGULATION","REJECT","RELATE","RELATION","RELATIONSHIP","RELATIVE","RELATIVELY","RELEASE","RELEVANT","RELIEF","RELIGION","RELIGIOUS","RELY","REMAIN","REMEMBER","REMIND","REMOVE","REPEAT","REPLACE","REPLY","REPORT","REPRESENT","REPRESENTATION","REPRESENTATIVE","REQUEST","REQUIRE","REQUIREMENT","RESEARCH","RESOURCE","RESPECT","RESPOND","RESPONSE","RESPONSIBILITY","RESPONSIBLE","REST","RESTAURANT","RESULT","RETAIN","RETURN","REVEAL","REVENUE","REVIEW","REVOLUTION","RICH","RIDE","RIGHT","RING","RISE","RISK","RIVER","ROAD","ROCK","ROLE","ROLL","ROOF","ROOM","ROUND","ROUTE","ROW","ROYAL","RULE","RUN","RURAL","SAFE","SAFETY","SALE","SAME","SAMPLE","SATISFY","SAVE","SAY","SCALE","SCENE","SCHEME","SCHOOL","SCIENCE","SCIENTIFIC","SCIENTIST","SCORE","SCREEN","SEA","SEARCH","SEASON","SEAT","SECOND","SECONDARY","SECRETARY","SECTION","SECTOR","SECURE","SECURITY","SEE","SEEK","SEEM","SELECT","SELECTION","SELL","SEND","SENIOR","SENSE","SENTENCE","SEPARATE","SEQUENCE","SERIES","SERIOUS","SERIOUSLY","SERVANT","SERVE","SERVICE","SESSION","SET","SETTLE","SETTLEMENT","SEVERAL","SEVERE","SEX","SEXUAL","SHAKE","SHALL","SHAPE","SHARE","SHE","SHEET","SHIP","SHOE","SHOOT","SHOP","SHORT","SHOT","SHOULD","SHOULDER","SHOUT","SHOW","SHUT","SIDE","SIGHT","SIGN","SIGNAL","SIGNIFICANCE","SIGNIFICANT","SILENCE","SIMILAR","SIMPLE","SIMPLY","SINCE","SING","SINGLE","SIR","SISTER","SIT","SITE","SITUATION","SIZE","SKILL","SKIN","SKY","SLEEP","SLIGHTLY","SLIP","SLOW","SLOWLY","SMALL","SMILE","SO","SOCIAL","SOCIETY","SOFT","SOFTWARE","SOIL","SOLDIER","SOLICITOR","SOLUTION","SOME","SOMEBODY","SOMEONE","SOMETHING","SOMETIMES","SOMEWHAT","SOMEWHERE","SON","SONG","SOON","SORRY","SORT","SOUND","SOURCE","SOUTH","SOUTHERN","SPACE","SPEAK","SPEAKER","SPECIAL","SPECIES","SPECIFIC","SPEECH","SPEED","SPEND","SPIRIT","SPORT","SPOT","SPREAD","SPRING","STAFF","STAGE","STAND","STANDARD","STAR","START","STATE","STATEMENT","STATION","STATUS","STAY","STEAL","STEP","STICK","STILL","STOCK","STONE","STOP","STORE","STORY","STRAIGHT","STRANGE","STRATEGY","STREET","STRENGTH","STRIKE","STRONG","STRONGLY","STRUCTURE","STUDENT","STUDIO","STUDY","STUFF","STYLE","SUBJECT","SUBSTANTIAL","SUCCEED","SUCCESS","SUCCESSFUL","SUCH","SUDDENLY","SUFFER","SUFFICIENT","SUGGEST","SUGGESTION","SUITABLE","SUM","SUMMER","SUN","SUPPLY","SUPPORT","SUPPOSE","SURE","SURELY","SURFACE","SURPRISE","SURROUND","SURVEY","SURVIVE","SWITCH","SYSTEM","TABLE","TAKE","TALK","TALL","TAPE","TARGET","TASK","TAX","TEA","TEACH","TEACHER","TEACHING","TEAM","TEAR","TECHNICAL","TECHNIQUE","TECHNOLOGY","TELEPHONE","TELEVISION","TELL","TEMPERATURE","TEND","TERM","TERMS","TERRIBLE","TEST","TEXT","THAN","THANK","THANKS","THAT","THE","THEATRE","THEIR","THEM","THEME","THEMSELVES","THEN","THEORY","THERE","THEREFORE","THESE","THEY","THIN","THING","THINK","THIS","THOSE","THOUGH","THOUGHT","THREAT","THREATEN","THROUGH","THROUGHOUT","THROW","THUS","TICKET","TIME","TINY","TITLE","TO","TODAY","TOGETHER","TOMORROW","TONE","TONIGHT","TOO","TOOL","TOOTH","TOP","TOTAL","TOTALLY","TOUCH","TOUR","TOWARDS","TOWN","TRACK","TRADE","TRADITION","TRADITIONAL","TRAFFIC","TRAIN","TRAINING","TRANSFER","TRANSPORT","TRAVEL","TREAT","TREATMENT","TREATY","TREE","TREND","TRIAL","TRIP","TROOP","TROUBLE","TRUE","TRUST","TRUTH","TRY","TURN","TWICE","TYPE","TYPICAL","UNABLE","UNDER","UNDERSTAND","UNDERSTANDING","UNDERTAKE","UNEMPLOYMENT","UNFORTUNATELY","UNION","UNIT","UNITED","UNIVERSITY","UNLESS","UNLIKELY","UNTIL","UP","UPON","UPPER","URBAN","US","USE","USED","USEFUL","USER","USUAL","USUALLY","VALUE","VARIATION","VARIETY","VARIOUS","VARY","VAST","VEHICLE","VERSION","VERY","VIA","VICTIM","VICTORY","VIDEO","VIEW","VILLAGE","VIOLENCE","VISION","VISIT","VISITOR","VITAL","VOICE","VOLUME","VOTE","WAGE","WAIT","WALK","WALL","WANT","WAR","WARM","WARN","WASH","WATCH","WATER","WAVE","WAY","WE","WEAK","WEAPON","WEAR","WEATHER","WEEK","WEEKEND","WEIGHT","WELCOME","WELFARE","WELL","WEST","WESTERN","WHAT","WHATEVER","WHEN","WHERE","WHEREAS","WHETHER","WHICH","WHILE","WHILST","WHITE","WHO","WHOLE","WHOM","WHOSE","WHY","WIDE","WIDELY","WIFE","WILD","WILL","WIN","WIND","WINDOW","WINE","WING","WINNER","WINTER","WISH","WITH","WITHDRAW","WITHIN","WITHOUT","WOMAN","WONDER","WONDERFUL","WOOD","WORD","WORK","WORKER","WORKING","WORKS","WORLD","WORRY","WORTH","WOULD","WRITE","WRITER","WRITING","WRONG","YARD","YEAH","YEAR","YES","YESTERDAY","YET","YOU","YOUNG","YOUR","YOURSELF","YOUTH" -------------------------------------------------------------------------------- /Python/42. Coded triangel numbers/coded_triangle_num.py: -------------------------------------------------------------------------------- 1 | 2 | #List of words from Words.txt provided in the link 3 | dictionary = [ 4 | "A","ABILITY","ABLE","ABOUT","ABOVE","ABSENCE","ABSOLUTELY","ACADEMIC","ACCEPT","ACCESS","ACCIDENT","ACCOMPANY","ACCORDING","ACCOUNT","ACHIEVE","ACHIEVEMENT","ACID","ACQUIRE","ACROSS","ACT","ACTION","ACTIVE","ACTIVITY","ACTUAL","ACTUALLY","ADD","ADDITION","ADDITIONAL","ADDRESS","ADMINISTRATION","ADMIT","ADOPT","ADULT","ADVANCE","ADVANTAGE","ADVICE","ADVISE","AFFAIR","AFFECT","AFFORD","AFRAID","AFTER","AFTERNOON","AFTERWARDS","AGAIN","AGAINST","AGE","AGENCY","AGENT","AGO","AGREE","AGREEMENT","AHEAD","AID","AIM","AIR","AIRCRAFT","ALL","ALLOW","ALMOST","ALONE","ALONG","ALREADY","ALRIGHT","ALSO","ALTERNATIVE","ALTHOUGH","ALWAYS","AMONG","AMONGST","AMOUNT","AN","ANALYSIS","ANCIENT","AND","ANIMAL","ANNOUNCE","ANNUAL","ANOTHER","ANSWER","ANY","ANYBODY","ANYONE","ANYTHING","ANYWAY","APART","APPARENT","APPARENTLY","APPEAL","APPEAR","APPEARANCE","APPLICATION","APPLY","APPOINT","APPOINTMENT","APPROACH","APPROPRIATE","APPROVE","AREA","ARGUE","ARGUMENT","ARISE","ARM","ARMY","AROUND","ARRANGE","ARRANGEMENT","ARRIVE","ART","ARTICLE","ARTIST","AS","ASK","ASPECT","ASSEMBLY","ASSESS","ASSESSMENT","ASSET","ASSOCIATE","ASSOCIATION","ASSUME","ASSUMPTION","AT","ATMOSPHERE","ATTACH","ATTACK","ATTEMPT","ATTEND","ATTENTION","ATTITUDE","ATTRACT","ATTRACTIVE","AUDIENCE","AUTHOR","AUTHORITY","AVAILABLE","AVERAGE","AVOID","AWARD","AWARE","AWAY","AYE","BABY","BACK","BACKGROUND","BAD","BAG","BALANCE","BALL","BAND","BANK","BAR","BASE","BASIC","BASIS","BATTLE","BE","BEAR","BEAT","BEAUTIFUL","BECAUSE","BECOME","BED","BEDROOM","BEFORE","BEGIN","BEGINNING","BEHAVIOUR","BEHIND","BELIEF","BELIEVE","BELONG","BELOW","BENEATH","BENEFIT","BESIDE","BEST","BETTER","BETWEEN","BEYOND","BIG","BILL","BIND","BIRD","BIRTH","BIT","BLACK","BLOCK","BLOOD","BLOODY","BLOW","BLUE","BOARD","BOAT","BODY","BONE","BOOK","BORDER","BOTH","BOTTLE","BOTTOM","BOX","BOY","BRAIN","BRANCH","BREAK","BREATH","BRIDGE","BRIEF","BRIGHT","BRING","BROAD","BROTHER","BUDGET","BUILD","BUILDING","BURN","BUS","BUSINESS","BUSY","BUT","BUY","BY","CABINET","CALL","CAMPAIGN","CAN","CANDIDATE","CAPABLE","CAPACITY","CAPITAL","CAR","CARD","CARE","CAREER","CAREFUL","CAREFULLY","CARRY","CASE","CASH","CAT","CATCH","CATEGORY","CAUSE","CELL","CENTRAL","CENTRE","CENTURY","CERTAIN","CERTAINLY","CHAIN","CHAIR","CHAIRMAN","CHALLENGE","CHANCE","CHANGE","CHANNEL","CHAPTER","CHARACTER","CHARACTERISTIC","CHARGE","CHEAP","CHECK","CHEMICAL","CHIEF","CHILD","CHOICE","CHOOSE","CHURCH","CIRCLE","CIRCUMSTANCE","CITIZEN","CITY","CIVIL","CLAIM","CLASS","CLEAN","CLEAR","CLEARLY","CLIENT","CLIMB","CLOSE","CLOSELY","CLOTHES","CLUB","COAL","CODE","COFFEE","COLD","COLLEAGUE","COLLECT","COLLECTION","COLLEGE","COLOUR","COMBINATION","COMBINE","COME","COMMENT","COMMERCIAL","COMMISSION","COMMIT","COMMITMENT","COMMITTEE","COMMON","COMMUNICATION","COMMUNITY","COMPANY","COMPARE","COMPARISON","COMPETITION","COMPLETE","COMPLETELY","COMPLEX","COMPONENT","COMPUTER","CONCENTRATE","CONCENTRATION","CONCEPT","CONCERN","CONCERNED","CONCLUDE","CONCLUSION","CONDITION","CONDUCT","CONFERENCE","CONFIDENCE","CONFIRM","CONFLICT","CONGRESS","CONNECT","CONNECTION","CONSEQUENCE","CONSERVATIVE","CONSIDER","CONSIDERABLE","CONSIDERATION","CONSIST","CONSTANT","CONSTRUCTION","CONSUMER","CONTACT","CONTAIN","CONTENT","CONTEXT","CONTINUE","CONTRACT","CONTRAST","CONTRIBUTE","CONTRIBUTION","CONTROL","CONVENTION","CONVERSATION","COPY","CORNER","CORPORATE","CORRECT","COS","COST","COULD","COUNCIL","COUNT","COUNTRY","COUNTY","COUPLE","COURSE","COURT","COVER","CREATE","CREATION","CREDIT","CRIME","CRIMINAL","CRISIS","CRITERION","CRITICAL","CRITICISM","CROSS","CROWD","CRY","CULTURAL","CULTURE","CUP","CURRENT","CURRENTLY","CURRICULUM","CUSTOMER","CUT","DAMAGE","DANGER","DANGEROUS","DARK","DATA","DATE","DAUGHTER","DAY","DEAD","DEAL","DEATH","DEBATE","DEBT","DECADE","DECIDE","DECISION","DECLARE","DEEP","DEFENCE","DEFENDANT","DEFINE","DEFINITION","DEGREE","DELIVER","DEMAND","DEMOCRATIC","DEMONSTRATE","DENY","DEPARTMENT","DEPEND","DEPUTY","DERIVE","DESCRIBE","DESCRIPTION","DESIGN","DESIRE","DESK","DESPITE","DESTROY","DETAIL","DETAILED","DETERMINE","DEVELOP","DEVELOPMENT","DEVICE","DIE","DIFFERENCE","DIFFERENT","DIFFICULT","DIFFICULTY","DINNER","DIRECT","DIRECTION","DIRECTLY","DIRECTOR","DISAPPEAR","DISCIPLINE","DISCOVER","DISCUSS","DISCUSSION","DISEASE","DISPLAY","DISTANCE","DISTINCTION","DISTRIBUTION","DISTRICT","DIVIDE","DIVISION","DO","DOCTOR","DOCUMENT","DOG","DOMESTIC","DOOR","DOUBLE","DOUBT","DOWN","DRAW","DRAWING","DREAM","DRESS","DRINK","DRIVE","DRIVER","DROP","DRUG","DRY","DUE","DURING","DUTY","EACH","EAR","EARLY","EARN","EARTH","EASILY","EAST","EASY","EAT","ECONOMIC","ECONOMY","EDGE","EDITOR","EDUCATION","EDUCATIONAL","EFFECT","EFFECTIVE","EFFECTIVELY","EFFORT","EGG","EITHER","ELDERLY","ELECTION","ELEMENT","ELSE","ELSEWHERE","EMERGE","EMPHASIS","EMPLOY","EMPLOYEE","EMPLOYER","EMPLOYMENT","EMPTY","ENABLE","ENCOURAGE","END","ENEMY","ENERGY","ENGINE","ENGINEERING","ENJOY","ENOUGH","ENSURE","ENTER","ENTERPRISE","ENTIRE","ENTIRELY","ENTITLE","ENTRY","ENVIRONMENT","ENVIRONMENTAL","EQUAL","EQUALLY","EQUIPMENT","ERROR","ESCAPE","ESPECIALLY","ESSENTIAL","ESTABLISH","ESTABLISHMENT","ESTATE","ESTIMATE","EVEN","EVENING","EVENT","EVENTUALLY","EVER","EVERY","EVERYBODY","EVERYONE","EVERYTHING","EVIDENCE","EXACTLY","EXAMINATION","EXAMINE","EXAMPLE","EXCELLENT","EXCEPT","EXCHANGE","EXECUTIVE","EXERCISE","EXHIBITION","EXIST","EXISTENCE","EXISTING","EXPECT","EXPECTATION","EXPENDITURE","EXPENSE","EXPENSIVE","EXPERIENCE","EXPERIMENT","EXPERT","EXPLAIN","EXPLANATION","EXPLORE","EXPRESS","EXPRESSION","EXTEND","EXTENT","EXTERNAL","EXTRA","EXTREMELY","EYE","FACE","FACILITY","FACT","FACTOR","FACTORY","FAIL","FAILURE","FAIR","FAIRLY","FAITH","FALL","FAMILIAR","FAMILY","FAMOUS","FAR","FARM","FARMER","FASHION","FAST","FATHER","FAVOUR","FEAR","FEATURE","FEE","FEEL","FEELING","FEMALE","FEW","FIELD","FIGHT","FIGURE","FILE","FILL","FILM","FINAL","FINALLY","FINANCE","FINANCIAL","FIND","FINDING","FINE","FINGER","FINISH","FIRE","FIRM","FIRST","FISH","FIT","FIX","FLAT","FLIGHT","FLOOR","FLOW","FLOWER","FLY","FOCUS","FOLLOW","FOLLOWING","FOOD","FOOT","FOOTBALL","FOR","FORCE","FOREIGN","FOREST","FORGET","FORM","FORMAL","FORMER","FORWARD","FOUNDATION","FREE","FREEDOM","FREQUENTLY","FRESH","FRIEND","FROM","FRONT","FRUIT","FUEL","FULL","FULLY","FUNCTION","FUND","FUNNY","FURTHER","FUTURE","GAIN","GAME","GARDEN","GAS","GATE","GATHER","GENERAL","GENERALLY","GENERATE","GENERATION","GENTLEMAN","GET","GIRL","GIVE","GLASS","GO","GOAL","GOD","GOLD","GOOD","GOVERNMENT","GRANT","GREAT","GREEN","GREY","GROUND","GROUP","GROW","GROWING","GROWTH","GUEST","GUIDE","GUN","HAIR","HALF","HALL","HAND","HANDLE","HANG","HAPPEN","HAPPY","HARD","HARDLY","HATE","HAVE","HE","HEAD","HEALTH","HEAR","HEART","HEAT","HEAVY","HELL","HELP","HENCE","HER","HERE","HERSELF","HIDE","HIGH","HIGHLY","HILL","HIM","HIMSELF","HIS","HISTORICAL","HISTORY","HIT","HOLD","HOLE","HOLIDAY","HOME","HOPE","HORSE","HOSPITAL","HOT","HOTEL","HOUR","HOUSE","HOUSEHOLD","HOUSING","HOW","HOWEVER","HUGE","HUMAN","HURT","HUSBAND","I","IDEA","IDENTIFY","IF","IGNORE","ILLUSTRATE","IMAGE","IMAGINE","IMMEDIATE","IMMEDIATELY","IMPACT","IMPLICATION","IMPLY","IMPORTANCE","IMPORTANT","IMPOSE","IMPOSSIBLE","IMPRESSION","IMPROVE","IMPROVEMENT","IN","INCIDENT","INCLUDE","INCLUDING","INCOME","INCREASE","INCREASED","INCREASINGLY","INDEED","INDEPENDENT","INDEX","INDICATE","INDIVIDUAL","INDUSTRIAL","INDUSTRY","INFLUENCE","INFORM","INFORMATION","INITIAL","INITIATIVE","INJURY","INSIDE","INSIST","INSTANCE","INSTEAD","INSTITUTE","INSTITUTION","INSTRUCTION","INSTRUMENT","INSURANCE","INTEND","INTENTION","INTEREST","INTERESTED","INTERESTING","INTERNAL","INTERNATIONAL","INTERPRETATION","INTERVIEW","INTO","INTRODUCE","INTRODUCTION","INVESTIGATE","INVESTIGATION","INVESTMENT","INVITE","INVOLVE","IRON","IS","ISLAND","ISSUE","IT","ITEM","ITS","ITSELF","JOB","JOIN","JOINT","JOURNEY","JUDGE","JUMP","JUST","JUSTICE","KEEP","KEY","KID","KILL","KIND","KING","KITCHEN","KNEE","KNOW","KNOWLEDGE","LABOUR","LACK","LADY","LAND","LANGUAGE","LARGE","LARGELY","LAST","LATE","LATER","LATTER","LAUGH","LAUNCH","LAW","LAWYER","LAY","LEAD","LEADER","LEADERSHIP","LEADING","LEAF","LEAGUE","LEAN","LEARN","LEAST","LEAVE","LEFT","LEG","LEGAL","LEGISLATION","LENGTH","LESS","LET","LETTER","LEVEL","LIABILITY","LIBERAL","LIBRARY","LIE","LIFE","LIFT","LIGHT","LIKE","LIKELY","LIMIT","LIMITED","LINE","LINK","LIP","LIST","LISTEN","LITERATURE","LITTLE","LIVE","LIVING","LOAN","LOCAL","LOCATION","LONG","LOOK","LORD","LOSE","LOSS","LOT","LOVE","LOVELY","LOW","LUNCH","MACHINE","MAGAZINE","MAIN","MAINLY","MAINTAIN","MAJOR","MAJORITY","MAKE","MALE","MAN","MANAGE","MANAGEMENT","MANAGER","MANNER","MANY","MAP","MARK","MARKET","MARRIAGE","MARRIED","MARRY","MASS","MASTER","MATCH","MATERIAL","MATTER","MAY","MAYBE","ME","MEAL","MEAN","MEANING","MEANS","MEANWHILE","MEASURE","MECHANISM","MEDIA","MEDICAL","MEET","MEETING","MEMBER","MEMBERSHIP","MEMORY","MENTAL","MENTION","MERELY","MESSAGE","METAL","METHOD","MIDDLE","MIGHT","MILE","MILITARY","MILK","MIND","MINE","MINISTER","MINISTRY","MINUTE","MISS","MISTAKE","MODEL","MODERN","MODULE","MOMENT","MONEY","MONTH","MORE","MORNING","MOST","MOTHER","MOTION","MOTOR","MOUNTAIN","MOUTH","MOVE","MOVEMENT","MUCH","MURDER","MUSEUM","MUSIC","MUST","MY","MYSELF","NAME","NARROW","NATION","NATIONAL","NATURAL","NATURE","NEAR","NEARLY","NECESSARILY","NECESSARY","NECK","NEED","NEGOTIATION","NEIGHBOUR","NEITHER","NETWORK","NEVER","NEVERTHELESS","NEW","NEWS","NEWSPAPER","NEXT","NICE","NIGHT","NO","NOBODY","NOD","NOISE","NONE","NOR","NORMAL","NORMALLY","NORTH","NORTHERN","NOSE","NOT","NOTE","NOTHING","NOTICE","NOTION","NOW","NUCLEAR","NUMBER","NURSE","OBJECT","OBJECTIVE","OBSERVATION","OBSERVE","OBTAIN","OBVIOUS","OBVIOUSLY","OCCASION","OCCUR","ODD","OF","OFF","OFFENCE","OFFER","OFFICE","OFFICER","OFFICIAL","OFTEN","OIL","OKAY","OLD","ON","ONCE","ONE","ONLY","ONTO","OPEN","OPERATE","OPERATION","OPINION","OPPORTUNITY","OPPOSITION","OPTION","OR","ORDER","ORDINARY","ORGANISATION","ORGANISE","ORGANIZATION","ORIGIN","ORIGINAL","OTHER","OTHERWISE","OUGHT","OUR","OURSELVES","OUT","OUTCOME","OUTPUT","OUTSIDE","OVER","OVERALL","OWN","OWNER","PACKAGE","PAGE","PAIN","PAINT","PAINTING","PAIR","PANEL","PAPER","PARENT","PARK","PARLIAMENT","PART","PARTICULAR","PARTICULARLY","PARTLY","PARTNER","PARTY","PASS","PASSAGE","PAST","PATH","PATIENT","PATTERN","PAY","PAYMENT","PEACE","PENSION","PEOPLE","PER","PERCENT","PERFECT","PERFORM","PERFORMANCE","PERHAPS","PERIOD","PERMANENT","PERSON","PERSONAL","PERSUADE","PHASE","PHONE","PHOTOGRAPH","PHYSICAL","PICK","PICTURE","PIECE","PLACE","PLAN","PLANNING","PLANT","PLASTIC","PLATE","PLAY","PLAYER","PLEASE","PLEASURE","PLENTY","PLUS","POCKET","POINT","POLICE","POLICY","POLITICAL","POLITICS","POOL","POOR","POPULAR","POPULATION","POSITION","POSITIVE","POSSIBILITY","POSSIBLE","POSSIBLY","POST","POTENTIAL","POUND","POWER","POWERFUL","PRACTICAL","PRACTICE","PREFER","PREPARE","PRESENCE","PRESENT","PRESIDENT","PRESS","PRESSURE","PRETTY","PREVENT","PREVIOUS","PREVIOUSLY","PRICE","PRIMARY","PRIME","PRINCIPLE","PRIORITY","PRISON","PRISONER","PRIVATE","PROBABLY","PROBLEM","PROCEDURE","PROCESS","PRODUCE","PRODUCT","PRODUCTION","PROFESSIONAL","PROFIT","PROGRAM","PROGRAMME","PROGRESS","PROJECT","PROMISE","PROMOTE","PROPER","PROPERLY","PROPERTY","PROPORTION","PROPOSE","PROPOSAL","PROSPECT","PROTECT","PROTECTION","PROVE","PROVIDE","PROVIDED","PROVISION","PUB","PUBLIC","PUBLICATION","PUBLISH","PULL","PUPIL","PURPOSE","PUSH","PUT","QUALITY","QUARTER","QUESTION","QUICK","QUICKLY","QUIET","QUITE","RACE","RADIO","RAILWAY","RAIN","RAISE","RANGE","RAPIDLY","RARE","RATE","RATHER","REACH","REACTION","READ","READER","READING","READY","REAL","REALISE","REALITY","REALIZE","REALLY","REASON","REASONABLE","RECALL","RECEIVE","RECENT","RECENTLY","RECOGNISE","RECOGNITION","RECOGNIZE","RECOMMEND","RECORD","RECOVER","RED","REDUCE","REDUCTION","REFER","REFERENCE","REFLECT","REFORM","REFUSE","REGARD","REGION","REGIONAL","REGULAR","REGULATION","REJECT","RELATE","RELATION","RELATIONSHIP","RELATIVE","RELATIVELY","RELEASE","RELEVANT","RELIEF","RELIGION","RELIGIOUS","RELY","REMAIN","REMEMBER","REMIND","REMOVE","REPEAT","REPLACE","REPLY","REPORT","REPRESENT","REPRESENTATION","REPRESENTATIVE","REQUEST","REQUIRE","REQUIREMENT","RESEARCH","RESOURCE","RESPECT","RESPOND","RESPONSE","RESPONSIBILITY","RESPONSIBLE","REST","RESTAURANT","RESULT","RETAIN","RETURN","REVEAL","REVENUE","REVIEW","REVOLUTION","RICH","RIDE","RIGHT","RING","RISE","RISK","RIVER","ROAD","ROCK","ROLE","ROLL","ROOF","ROOM","ROUND","ROUTE","ROW","ROYAL","RULE","RUN","RURAL","SAFE","SAFETY","SALE","SAME","SAMPLE","SATISFY","SAVE","SAY","SCALE","SCENE","SCHEME","SCHOOL","SCIENCE","SCIENTIFIC","SCIENTIST","SCORE","SCREEN","SEA","SEARCH","SEASON","SEAT","SECOND","SECONDARY","SECRETARY","SECTION","SECTOR","SECURE","SECURITY","SEE","SEEK","SEEM","SELECT","SELECTION","SELL","SEND","SENIOR","SENSE","SENTENCE","SEPARATE","SEQUENCE","SERIES","SERIOUS","SERIOUSLY","SERVANT","SERVE","SERVICE","SESSION","SET","SETTLE","SETTLEMENT","SEVERAL","SEVERE","SEX","SEXUAL","SHAKE","SHALL","SHAPE","SHARE","SHE","SHEET","SHIP","SHOE","SHOOT","SHOP","SHORT","SHOT","SHOULD","SHOULDER","SHOUT","SHOW","SHUT","SIDE","SIGHT","SIGN","SIGNAL","SIGNIFICANCE","SIGNIFICANT","SILENCE","SIMILAR","SIMPLE","SIMPLY","SINCE","SING","SINGLE","SIR","SISTER","SIT","SITE","SITUATION","SIZE","SKILL","SKIN","SKY","SLEEP","SLIGHTLY","SLIP","SLOW","SLOWLY","SMALL","SMILE","SO","SOCIAL","SOCIETY","SOFT","SOFTWARE","SOIL","SOLDIER","SOLICITOR","SOLUTION","SOME","SOMEBODY","SOMEONE","SOMETHING","SOMETIMES","SOMEWHAT","SOMEWHERE","SON","SONG","SOON","SORRY","SORT","SOUND","SOURCE","SOUTH","SOUTHERN","SPACE","SPEAK","SPEAKER","SPECIAL","SPECIES","SPECIFIC","SPEECH","SPEED","SPEND","SPIRIT","SPORT","SPOT","SPREAD","SPRING","STAFF","STAGE","STAND","STANDARD","STAR","START","STATE","STATEMENT","STATION","STATUS","STAY","STEAL","STEP","STICK","STILL","STOCK","STONE","STOP","STORE","STORY","STRAIGHT","STRANGE","STRATEGY","STREET","STRENGTH","STRIKE","STRONG","STRONGLY","STRUCTURE","STUDENT","STUDIO","STUDY","STUFF","STYLE","SUBJECT","SUBSTANTIAL","SUCCEED","SUCCESS","SUCCESSFUL","SUCH","SUDDENLY","SUFFER","SUFFICIENT","SUGGEST","SUGGESTION","SUITABLE","SUM","SUMMER","SUN","SUPPLY","SUPPORT","SUPPOSE","SURE","SURELY","SURFACE","SURPRISE","SURROUND","SURVEY","SURVIVE","SWITCH","SYSTEM","TABLE","TAKE","TALK","TALL","TAPE","TARGET","TASK","TAX","TEA","TEACH","TEACHER","TEACHING","TEAM","TEAR","TECHNICAL","TECHNIQUE","TECHNOLOGY","TELEPHONE","TELEVISION","TELL","TEMPERATURE","TEND","TERM","TERMS","TERRIBLE","TEST","TEXT","THAN","THANK","THANKS","THAT","THE","THEATRE","THEIR","THEM","THEME","THEMSELVES","THEN","THEORY","THERE","THEREFORE","THESE","THEY","THIN","THING","THINK","THIS","THOSE","THOUGH","THOUGHT","THREAT","THREATEN","THROUGH","THROUGHOUT","THROW","THUS","TICKET","TIME","TINY","TITLE","TO","TODAY","TOGETHER","TOMORROW","TONE","TONIGHT","TOO","TOOL","TOOTH","TOP","TOTAL","TOTALLY","TOUCH","TOUR","TOWARDS","TOWN","TRACK","TRADE","TRADITION","TRADITIONAL","TRAFFIC","TRAIN","TRAINING","TRANSFER","TRANSPORT","TRAVEL","TREAT","TREATMENT","TREATY","TREE","TREND","TRIAL","TRIP","TROOP","TROUBLE","TRUE","TRUST","TRUTH","TRY","TURN","TWICE","TYPE","TYPICAL","UNABLE","UNDER","UNDERSTAND","UNDERSTANDING","UNDERTAKE","UNEMPLOYMENT","UNFORTUNATELY","UNION","UNIT","UNITED","UNIVERSITY","UNLESS","UNLIKELY","UNTIL","UP","UPON","UPPER","URBAN","US","USE","USED","USEFUL","USER","USUAL","USUALLY","VALUE","VARIATION","VARIETY","VARIOUS","VARY","VAST","VEHICLE","VERSION","VERY","VIA","VICTIM","VICTORY","VIDEO","VIEW","VILLAGE","VIOLENCE","VISION","VISIT","VISITOR","VITAL","VOICE","VOLUME","VOTE","WAGE","WAIT","WALK","WALL","WANT","WAR","WARM","WARN","WASH","WATCH","WATER","WAVE","WAY","WE","WEAK","WEAPON","WEAR","WEATHER","WEEK","WEEKEND","WEIGHT","WELCOME","WELFARE","WELL","WEST","WESTERN","WHAT","WHATEVER","WHEN","WHERE","WHEREAS","WHETHER","WHICH","WHILE","WHILST","WHITE","WHO","WHOLE","WHOM","WHOSE","WHY","WIDE","WIDELY","WIFE","WILD","WILL","WIN","WIND","WINDOW","WINE","WING","WINNER","WINTER","WISH","WITH","WITHDRAW","WITHIN","WITHOUT","WOMAN","WONDER","WONDERFUL","WOOD","WORD","WORK","WORKER","WORKING","WORKS","WORLD","WORRY","WORTH","WOULD","WRITE","WRITER","WRITING","WRONG","YARD","YEAH","YEAR","YES","YESTERDAY","YET","YOU","YOUNG","YOUR","YOURSELF","YOUTH"] 5 | 6 | #List of all capital english alphabets 7 | alphabets = [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] 8 | 9 | 10 | #This function returns the count of total number of triangle words in the list 11 | def count_coded_tri(words_list): #Accepting the total list of words 12 | 13 | total_count = 0 #Variable to store total count of the triangle numbers in the list 14 | 15 | for i in range (0, len(words_list)): #Taking all the words from the 'dictionary' 16 | word = words_list[i] #extracting words out of 'dictionary' 17 | 18 | word_sum = get_word_sum_value(word) #Calling function to get the numeric value of the sum 19 | 20 | count = 1 #Counter to store which index of triangle number will be generated next 21 | current_tri_num = generate_tri_num(count) #Generating triangle number of index 'count' and storing 22 | 23 | while current_tri_num <= word_sum : #Checking if the word is a triangle word or not 24 | if current_tri_num == word_sum: #If the word matches a triangle number 25 | total_count += 1 #Then it is a triangle number. So, increment toatal triangle number count by 1 26 | break #Breaking the loop 27 | 28 | else: #If not found then 29 | count += 1 #Increment 'count' by 1 to generate next triangle number 30 | current_tri_num = generate_tri_num(count) #Generate the new triangle number and store 31 | 32 | 33 | return total_count #Return the total numer of triangle numbers found in the dictionary 34 | 35 | #This function finds the numeric value of the words passed to it 36 | def get_word_sum_value(word): #Accepting a word, which needs to be converted into numeric value 37 | 38 | word_sum = 0 #Init the variable thta will store the sum of the digits 39 | 40 | for index in range(0, len(word)): #Looping through the lenght of the word 41 | character = word[index] #Picking the character at 'index' 42 | 43 | for position in range (0, len(alphabets)): #Looping throught the length of the List 'alphabets' 44 | if character == alphabets[position]: #If 'character' matches an element in 'alphabets' at 'position' 45 | word_sum += (position+1) #Increment the 'word_sum' with its respective natural number position 46 | 47 | 48 | return word_sum #Returning the numeric value of the word 49 | 50 | 51 | #This function generates and returns the triangle number of the 'n' value passed to it 52 | def generate_tri_num(n): #Accepting a number of which the triangle number is to be generated 53 | return (1/2)*n*(n+1) #Returning the generated triangle number 54 | 55 | 56 | print(count_coded_tri(dictionary)) #Testing the output -------------------------------------------------------------------------------- /Python/44. Pentagon Numbers/av-arvind77.py: -------------------------------------------------------------------------------- 1 | #EULER PROBLEM 44 PENTAGON NUMBERS 2 | import time 3 | start = time.time() 4 | 5 | 6 | def is_pentagonal(n): 7 | if (1+(24*n+1)**0.5) % 6 == 0: 8 | return True 9 | return False 10 | flag = True 11 | i = 1 12 | while flag: 13 | for j in range(1, i): 14 | a = i*(3*i-1)/2 15 | b = j*(3*j-1)/2 16 | if is_pentagonal(a+b) and is_pentagonal(a-b): 17 | print(a-b) 18 | flag = False 19 | break 20 | i += 1 21 | end = time.time() 22 | print(end - start) -------------------------------------------------------------------------------- /Python/45.Triangular, pentagonal, and hexagonal/said3427.py: -------------------------------------------------------------------------------- 1 | # Euler 45. Triangular, pentagonal, and hexagonal 2 | import math 3 | 4 | def isPentagonal(x): 5 | result=(1+math.sqrt(24*x+1))/6 6 | return result.is_integer() 7 | 8 | def isTriangle(x): 9 | result=(-1+math.sqrt(8*x+1))/2 10 | return result.is_integer() 11 | 12 | def isHexagonal(x): 13 | result=(1+math.sqrt(8*x+1))/4 14 | return result.is_integer() 15 | 16 | def Hexagonal(x): 17 | return x*(2*x-1) 18 | 19 | i=0 20 | n=1 21 | while i<3: 22 | num=Hexagonal(n) 23 | if isTriangle(num) and isPentagonal(num): 24 | i+=1 25 | n+=1 26 | 27 | print(num) -------------------------------------------------------------------------------- /Python/46.Goldbach's other conjecture/said3427.py: -------------------------------------------------------------------------------- 1 | # Euler 46.Goldbach's other conjecture 2 | import math 3 | def primes_sieve2(limit): 4 | a = [True] * limit 5 | a[0] = a[1] = False 6 | for (i, isprime) in enumerate(a): 7 | if isprime: 8 | yield i 9 | for n in range(i*i, limit, i): 10 | a[n] = False 11 | 12 | def isComposite(x): 13 | for i in range(2,x): 14 | if x%i==0 and i!=x: 15 | return True 16 | return False 17 | 18 | i=9 19 | while True: 20 | if isComposite(i): 21 | n=0 22 | for j in primes_sieve2(i): 23 | probe=math.sqrt((i-j)/2) 24 | if probe.is_integer(): 25 | n+=1 26 | if n==0: 27 | break 28 | i+=2 29 | 30 | print(i) -------------------------------------------------------------------------------- /Python/47.Distinct primes factors/said3427.py: -------------------------------------------------------------------------------- 1 | # Euler 47.Distinct primes factors 2 | import math 3 | 4 | def factor(n): 5 | if n <= 1: return [] 6 | prime = next((x for x in range(2, math.ceil(math.sqrt(n))+1) if n%x == 0), n) 7 | return [prime] + factor(n//prime) 8 | 9 | n=4 10 | i=0 11 | end=0 12 | while True: 13 | i+=1 14 | l=len(set(factor(i))) 15 | if l != n: 16 | end=0 17 | else: 18 | end+=1 19 | if end==n: 20 | result=i-n+1 21 | break 22 | 23 | print(result) -------------------------------------------------------------------------------- /Python/48. Self power/selfpowers.py: -------------------------------------------------------------------------------- 1 | sumSerie = 0 2 | for i in range(1, 1001): 3 | sumSerie += (i**i) 4 | sumSerie = str(sumSerie) 5 | tam = len(sumSerie) 6 | serie = "" 7 | for i in range((tam-11), tam-1): 8 | serie += sumSerie[i] 9 | print(serie) -------------------------------------------------------------------------------- /Python/49.Prime permutations/said3427.py: -------------------------------------------------------------------------------- 1 | # Euler 49. Prime Permutations 2 | # Not an optimized solution, but it works. 3 | def primes_sieve2(limit): 4 | a = [True] * limit 5 | a[0] = a[1] = False 6 | 7 | for (i, isprime) in enumerate(a): 8 | if isprime: 9 | yield i 10 | for n in range(i*i, limit, i): 11 | a[n] = False 12 | 13 | primes=[x for x in primes_sieve2(9999) if len(str(x))==4 and x not in [1487, 4817, 8147]] 14 | 15 | def Euler49(): 16 | for i in range(len(primes)): 17 | d1=primes[i] 18 | primeraresta=set([x-d1 for x in primes[i+1::]]) 19 | for j in range(i+1,len(primes)): 20 | d2=primes[j] 21 | for k in range(j+1,len(primes)): 22 | d3=primes[k] 23 | if d2-d1==d3-d2: 24 | FirstPrime=set(list(str(d2))) 25 | SecondPrime=set(list(str(d1))) 26 | ThirdPrime=set(list(str(d3))) 27 | if len(ThirdPrime.intersection(FirstPrime).intersection(SecondPrime))==len(FirstPrime) and len(FirstPrime)==len(SecondPrime) and len(SecondPrime)==len(ThirdPrime): 28 | return(print("%s%s%s"%(d1,d2,d3))) 29 | 30 | Euler49() -------------------------------------------------------------------------------- /Python/5. Smallest multiple/smallest_multi.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Project Euler Challenge 05. Smallest multiple 3 | Problem Statement: What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? 4 | ''' 5 | 6 | ''' 7 | Note: I optimised the brute force code as much as I could. 8 | If anyone could optimise it further, feel free. I figured an alternate methord by factorization with 9 | lower time complexity. Make sure you have a look at that too (if not available in this repository 10 | check online.) 11 | ''' 12 | 13 | #Methord Used : Brute Force 14 | #Time Complexity : ~61 ms 15 | 16 | #Alternate methord: Factorization Algorithm 17 | 18 | from datetime import datetime #Importing datetime for calculating time complexity 19 | 20 | def smallest(): #Returns the smallest +ve number that is evenly divisible to all the numbers between 1 to 20 21 | start_time = datetime.now() 22 | num = 20 23 | #check = [20, 19, 18, 17, 16, 14, 13, 11] 24 | check = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1] 25 | while True: 26 | for i in range (0, len(check)): 27 | if(num%check[i] !=0): 28 | num+=20 29 | break 30 | if i==(len(check)-1): 31 | print(num) 32 | print("TOTAL TIME: ", datetime.now()-start_time,) 33 | break 34 | 35 | smallest() #Calling the function to get results -------------------------------------------------------------------------------- /Python/50. Consecutive prime sum/said3427.py: -------------------------------------------------------------------------------- 1 | # Euler 50. Consecutive prime sum 2 | 3 | def primes_sieve2(limit): 4 | a = [True] * limit 5 | a[0] = a[1] = False 6 | 7 | for (i, isprime) in enumerate(a): 8 | if isprime: 9 | yield i 10 | for n in range(i*i, limit, i): 11 | a[n] = False 12 | 13 | 14 | n=1000000 15 | primes=list(primes_sieve2(n)) 16 | i=0 17 | j=0 18 | while jn: 27 | break 28 | 29 | suma=suma-primes[k-1]+primes[k+i-1] 30 | if suma in primes: 31 | nexti=False 32 | break 33 | i=i-1 34 | 35 | print(suma) -------------------------------------------------------------------------------- /Python/6. Sum square difference/sum_square_difference.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Project Euler Challenge 06. Sum square difference in Python 3 | Problem Statement: Find the sum square difference of first hundred natural numbers 4 | ''' 5 | 6 | def sum_sq_dif(): # A function that will return the sum_square_difference of first 100 nautral numbers 7 | 8 | sum_of_sq = 0 # Initialising this variable to store the sum of squares 9 | sq_of_sum = 0 # Initialising this variable to store the square of sums 10 | 11 | for i in range(1, 101): # A loop to get the first 100 natural numbers (numbers gets stored in 'i') 12 | 13 | sum_of_sq += i*i # Adding the square of 'i' to the get the sum of squares 14 | sq_of_sum += i # Adding 'i' to the get the sum of the numbers 15 | 16 | sq_of_sum *= sq_of_sum # Squaring the sum of numbers to get the square of sum (after loop ends) 17 | 18 | return sq_of_sum - sum_of_sq # returning the difference between the square of sums and sums of square 19 | 20 | 21 | print(sum_sq_dif()) # Calling the function to check output -------------------------------------------------------------------------------- /Python/7.10001st_prime/SanchiMittal.py: -------------------------------------------------------------------------------- 1 | ''' 2 | The 10001st prime number will be printed. 3 | 4 | Algorithm used -> Sieve Of Eratosthenes 5 | ''' 6 | 7 | m = 1000100 8 | ''' 9 | This function looks for prime numbers between 1 and m 10 | and returns the n-th prime number. Here, n = 10001. 11 | -1 is returned if n-th prime number is not found in 12 | the mentioned range. 13 | ''' 14 | def SieveOfEratosthenes(n): 15 | A = [True for i in range(2,m)] 16 | A[0] = False 17 | A[1] = False 18 | counter = 0 19 | for i in range(2,len(A)): 20 | if A[i] == True: 21 | counter+=1 22 | for j in range(i*i, len(A), i): 23 | A[j] = False 24 | 25 | if counter == n: 26 | return i 27 | 28 | return -1 29 | 30 | print(SieveOfEratosthenes(10001)) -------------------------------------------------------------------------------- /Python/8. Largest product in a series/LargestProductInASeries.py: -------------------------------------------------------------------------------- 1 | def mul(x): # to multiply the elements of a list 2 | result=1 3 | for i in x: 4 | result=result*i 5 | return result 6 | 7 | # formatting the input properly 8 | 9 | # `````````````````````````````````````````````````````````````````` 10 | 11 | inputis=''' 12 | 73167176531330624919225119674426574742355349194934 13 | 96983520312774506326239578318016984801869478851843 14 | 85861560789112949495459501737958331952853208805511 15 | 12540698747158523863050715693290963295227443043557 16 | 66896648950445244523161731856403098711121722383113 17 | 62229893423380308135336276614282806444486645238749 18 | 30358907296290491560440772390713810515859307960866 19 | 70172427121883998797908792274921901699720888093776 20 | 65727333001053367881220235421809751254540594752243 21 | 52584907711670556013604839586446706324415722155397 22 | 53697817977846174064955149290862569321978468622482 23 | 83972241375657056057490261407972968652414535100474 24 | 82166370484403199890008895243450658541227588666881 25 | 16427171479924442928230863465674813919123162824586 26 | 17866458359124566529476545682848912883142607690042 27 | 24219022671055626321111109370544217506941658960408 28 | 07198403850962455444362981230987879927244284909188 29 | 84580156166097919133875499200524063689912560717606 30 | 05886116467109405077541002256983155200055935729725 31 | 71636269561882670428252483600823257530420752963450''' 32 | #print(inputis) 33 | inputis=inputis.split("\n") 34 | inputis="".join(inputis) 35 | #print(inputis) 36 | 37 | # input is ready for use 38 | # `````````````````````````````````````````````````````````` 39 | 40 | list13=[] 41 | maxnum=0 42 | newnum=0 43 | 44 | 45 | flag=False 46 | for i in range(len(inputis)): # main Loop 47 | 48 | for j in range(13): # Taking next 12 numbers { current +12} =13 49 | if(i+12maxnum): # check if the result you got is bigger 62 | maxnum=newnum 63 | 64 | list13.clear(); # empty the list for fresh list to form 65 | if(flag): 66 | break # Main loop breaks here 67 | print(maxnum) # print Result 68 | 69 | 70 | -------------------------------------------------------------------------------- /Python/9.Special_Pythagorean_triplet/pr4k.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Project Euler : Problem 9 3 | 4 | A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, 5 | a2 + b2 = c2 6 | 7 | For example, 32 + 42 = 9 + 16 = 25 = 52. 8 | 9 | There exists exactly one Pythagorean triplet for which a + b + c = 1000. 10 | Find the product abc. 11 | 12 | ''' 13 | # Method Used ~ Brute Force 14 | 15 | # time ~ 0.22s user 0.02s system 99% cpu 0.233 total 16 | 17 | # Alternate method ~ To be found 18 | 19 | for a in range(1,1001):#iterating a for 1-1000 20 | for b in range(1,1001): # iterating b for 1-1000 21 | c=1000-a-b # finding c from condition a+b+c=1000 22 | if a 12 | Your solution should be at -> Java/01.Multiples_of_3_and_5/your_user_name.java 13 | ``` 14 | - Add :white_check_mark: `:white_check_mark:` to the table against the problem you've solved. 15 | - Name the P.R. With the format as `problem_number done in This_Lang`, and Mention the same in the code(File) as a comment `Euler Problem_num`.(**Within the File**) 16 | - While Editing The ReadMe For PR, Use "**No Wrap**" Option { At Top Right Of 'Edit File' Tool On Githtub} 17 | - Send a PR 18 | - [Thanks](#Thanks) 19 | 20 | 21 | Happy Contributing! 😃 22 | 23 | 24 | ⭐ to show support! 25 | 26 | ## Contributors 27 | [![](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/images/0)](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/links/0)[![](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/images/1)](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/links/1)[![](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/images/2)](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/links/2)[![](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/images/3)](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/links/3)[![](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/images/4)](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/links/4)[![](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/images/5)](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/links/5)[![](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/images/6)](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/links/6)[![](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/images/7)](https://sourcerer.io/fame/imabhishekkumar/RisingLight/Project-Euler/links/7) 28 | 29 | ## Problems 30 | 31 | | No | Problem Statement | CPP | Java | JS | Py3 | Kotlin | Dart | C | C# | Go Lang | R | Ruby | Swift | 32 | |----|------------------------------------------------------------------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------| 33 | | 01 | [Multiples of 3 and 5](https://projecteuler.net/problem=1) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | 34 | | 02 | [Even Fibonacci numbers](https://projecteuler.net/problem=2) | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | | 35 | | 03 | [Largest prime factor](https://projecteuler.net/problem=3) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | | | 36 | | 04 | [Largest palindrome product](https://projecteuler.net/problem=4) | :white_check_mark: | :white_check_mark: | | :white_check_mark: | | | :white_check_mark: | | :white_check_mark: | | | | 37 | | 05 | [Smallest multiple](https://projecteuler.net/problem=5) | :white_check_mark: | | | :white_check_mark: | | | | | :white_check_mark: | | | | 38 | | 06 | [Sum square difference](https://projecteuler.net/problem=6) | :white_check_mark: | :white_check_mark: | | :white_check_mark: | | :white_check_mark: | :white_check_mark: | | :white_check_mark: | | | | 39 | | 07 | [10001st prime](https://projecteuler.net/problem=7) | :white_check_mark: | | | :white_check_mark: | | :white_check_mark: | :white_check_mark: | | | | | | 40 | | 08 | [Largest product in a series](https://projecteuler.net/problem=8) | | | | :white_check_mark: | | | | | | | | | 41 | | 09 | [Special Pythagorean triplet](https://projecteuler.net/problem=9) | :white_check_mark: | | | :white_check_mark: | | | | | | | | | 42 | | 10 | [Summation of primes](https://projecteuler.net/problem=10) | | | | :white_check_mark: | | | :white_check_mark: | | | | | | 43 | | 11 | [Largest product in a grid](https://projecteuler.net/problem=11) | | | | :white_check_mark: | | | :white_check_mark: | | | | | | 44 | | 12 | [Highly divisible triangular number](https://projecteuler.net/problem=12) | | | | :white_check_mark: | | | :white_check_mark: | | | | | | 45 | | 13 | [Large sum](https://projecteuler.net/problem=13) | :white_check_mark: | | | :white_check_mark: | | | | | | | | | 46 | | 14 | [Longest Collatz sequence](https://projecteuler.net/problem=14) | | | | | | | | | | | | | 47 | | 15 | [Lattice paths](https://projecteuler.net/problem=15) | | | | | | | | | | | | | 48 | | 16 | [Power digit sum](https://projecteuler.net/problem=16) | | :white_check_mark: | | :white_check_mark: | | | | | | | | | 49 | | 17 | [Number letter counts](https://projecteuler.net/problem=17) | | | | :white_check_mark: | | | | | | | | | 50 | | 18 | [Maximum path sum I](https://projecteuler.net/problem=18) | | | | :white_check_mark: | | | | | | | | | 51 | | 19 | [Counting Sundays](https://projecteuler.net/problem=19) | | | | | | | | | | | | | 52 | | 20 | [Factorial digit sum](https://projecteuler.net/problem=20) | | :white_check_mark: | | :white_check_mark: | :white_check_mark: | | | | | | | | 53 | | 21 | [Amicable numbers](https://projecteuler.net/problem=21) | | | | | | | | | | | | | 54 | | 22 | [Names scores](https://projecteuler.net/problem=22) | | | | :white_check_mark: | | | | | | | | | 55 | | 23 | [Non-abundant sums](https://projecteuler.net/problem=23) | | | | | | | | | | | | | 56 | | 24 | [Lexicographic permutations](https://projecteuler.net/problem=24) | | | | | | | | | | | | | 57 | | 25 | [1000-digit Fibonacci number](https://projecteuler.net/problem=25) | | | | :white_check_mark: | | | | | | | | | 58 | | 26 | [Reciprocal cycles](https://projecteuler.net/problem=26) | | | | | | | | | | | | | 59 | | 27 | [Quadratic primes](https://projecteuler.net/problem=27) | | :white_check_mark: | | | | | | | | | | | 60 | | 28 | [Number spiral diagonals](https://projecteuler.net/problem=28) | :white_check_mark: | :white_check_mark: | | :white_check_mark: | | | :white_check_mark: | | | | | | 61 | | 29 | [Distinct powers](https://projecteuler.net/problem=29) | | | | :white_check_mark: | | | | | | | | | 62 | | 30 | [Digit fifth powers](https://projecteuler.net/problem=30) | | | | :white_check_mark: | | | | | | | | | 63 | | 31 | [Coin sums](https://projecteuler.net/problem=31) | | :white_check_mark: | | :white_check_mark: | | | | | | | | | 64 | | 32 | [Pandigital products](https://projecteuler.net/problem=32) | | | | | | | | | | | | | 65 | | 33 | [Digit cancelling fractions](https://projecteuler.net/problem=33) | | | | | | | | | | | | | 66 | | 34 | [Digit factorials](https://projecteuler.net/problem=34) | | | | | | | | | | | | | 67 | | 35 | [Circular primes](https://projecteuler.net/problem=35) | | | | :white_check_mark: | | | | | | | | | 68 | | 36 | [Double-base palindromes](https://projecteuler.net/problem=36) | | | | | | | | | | | | | 69 | | 37 | [Truncatable primes](https://projecteuler.net/problem=37) | | | | | | | | | | | | | 70 | | 38 | [Pandigital multiples](https://projecteuler.net/problem=38) | | | | | | | | | | | | | 71 | | 39 | [Integer right triangles](https://projecteuler.net/problem=39) | :white_check_mark: | :white_check_mark: | | | | | | | | | | | 72 | | 40 | [Champernowne's constant](https://projecteuler.net/problem=40) | | | | :white_check_mark: | | | | | | | | | 73 | | 41 | [Pandigital prime](https://projecteuler.net/problem=41) | | | | :white_check_mark: | | | | | | | | | 74 | | 42 | [Coded triangle numbers](https://projecteuler.net/problem=42) | | | | :white_check_mark: | | | | | | | | | 75 | | 43 | [Sub-string divisibility](https://projecteuler.net/problem=43) | | | | | | | | | | | | | 76 | | 44 | [Pentagon numbers](https://projecteuler.net/problem=44) | | | | :white_check_mark: | | | | | | | | | 77 | | 45 | [Triangular, pentagonal, and hexagonal](https://projecteuler.net/problem=45) | | | | :white_check_mark: | | | | | | | | | 78 | | 46 | [Goldbach's other conjecture](https://projecteuler.net/problem=46) | | | | :white_check_mark: | | | | | | | | | 79 | | 47 | [Distinct primes factors](https://projecteuler.net/problem=47) | | | | :white_check_mark: | | | | | | | | | 80 | | 48 | [Self powers](https://projecteuler.net/problem=48) | | | | :white_check_mark: | | | | | | | | | 81 | | 49 | [Prime permutations](https://projecteuler.net/problem=49) | | | | :white_check_mark: | | | | | | | | | 82 | | 50 | [Consecutive prime sum](https://projecteuler.net/problem=50) | | | | :white_check_mark: | | | :white_check_mark: | | :white_check_mark: | | | | 83 | 84 | 85 | ## Thanks 86 | 87 | - Thanks to you all who are doing their best in solving the problems, we appriciate your efforts. 88 | - We thank you all for the overwelming P.R that we have recieved, To mantain the quality and response of the P.R we have updated the 89 | [guidelines](#How-to-contribute). 90 | - We are reluctant to change/modify the already merged P.R. to meet the current Guidelines, as that may modify the contributer's title to that file. 91 | - We would appriciate, if all of you could do the necessary modification, hence it won't affect your contribution as per HacktoberFest. 92 | - Keep Up the Efforts. 93 | 94 | 95 | -------------------------------------------------------------------------------- /Ruby/01.Multiples of 3 and 5/24sharkS.rb: -------------------------------------------------------------------------------- 1 | # Euler Problem_01 2 | 3 | i=3 4 | sum=0 5 | while i<1000 6 | if (i%3==0) or (i%5==0) 7 | sum+=i 8 | end 9 | i+=1 10 | end 11 | 12 | puts sum 13 | -------------------------------------------------------------------------------- /Ruby/02.Even Fibonacci numbers/24sharkS.rb: -------------------------------------------------------------------------------- 1 | # Euler Problem_02 2 | 3 | a = 1 4 | b = Math.sqrt(5) 5 | phi0 = (a + b)/2 6 | phi1 = (a - b)/2 7 | i = 0 8 | sum = 0 9 | num = 0 10 | 11 | while num.to_i <= 4000000 12 | if num.to_i%2 == 0 13 | sum+=num 14 | end 15 | i+=1 16 | num = ( phi0**i - phi1**i )/b 17 | end 18 | 19 | print sum.to_i 20 | -------------------------------------------------------------------------------- /Ruby/README.md: -------------------------------------------------------------------------------- 1 | Add Ruby files here 2 | -------------------------------------------------------------------------------- /Swift/1. Multiples of 3 and 5/multiplesOf3And5.swift: -------------------------------------------------------------------------------- 1 | //Euler Problem_01 2 | var sum = 0 3 | (3..<1000).forEach { ($0 % 3 == 0 || $0 % 5 == 0) ? (sum += $0) : (sum += 0) } 4 | print(sum) 5 | -------------------------------------------------------------------------------- /Swift/README.md: -------------------------------------------------------------------------------- 1 | Add Swift files here 2 | --------------------------------------------------------------------------------