Project Euler : 51–55

Without thinking much I first wrote a brute force algorithm and it gave answer within 2 seconds. But, a fact can reduce searching space. x and 6x will contain same digits, so number of digits in x and 6x should also be same. If x is…


Project Euler : 56–60

For a language like Python, its a child play. So I used that and implemented my brute force algorithm which checks every number, raise its power and finds sum of digits in it. Gives answer in 1 second


Project Euler : 66–70

This is a harder version of problem 18. In problem 18, number of rows were only 15 but here 100. The algorithm does not need any change but the dimensions do. You can read strategy to solve problem 18 on this post of my blog.


Project Euler : 26–30

Just a simple thought to find a method is enough to solve this question. When would recurring cycle occur? As soon we have a remainder which has already been seen while division cycle will begin because next remainder would be same and…


Project Euler : 86–90

This problem does not have something new, just like most other problems on ProjectEuler. I wrote a brute force algorithm and I don’t think there is any other way except checking every possibility. Pre-calculate all primes below 50…


Project Euler : 11–15

I could not think of better than brute force for this problem, and probably there is not any. You have to check every possibility which may lead to highest product. So scan this given 20x20 grid as a two dimensional array and for each…


Project Euler : 31–35

Instead of saying much, I would redirect you to a link which will elaborate what to do and how to code this problem.

  • Problem 33 ( Click to Read )

Project Euler : 61–65

The first thought in your mind would be to write a brute force algorithm, but I wrote a clever one. Let me explain it without further boasting. Find nth root of smallest and largest ’n’ digit numbers (say a and b). Now we are sure that…


Project Euler : 81–85

No doubt this is an interesting problem. To solve this I have populated all the cells of matrix from top to bottom, column-wise in each row. To reach any cell there are only two ways either from top or from left. Since I am populating…


Project Euler : 36–40

Simple problem which will run easily within time limit with brute force algorithm. There is little catch. Problem says “Palindromic number may not include leading zeros”. If a binary number palindrome has zero as last bit than its…

Project Euler
Project Euler
My solution to Project Euler problems
More information
Followers
18
Elsewhere