Skip to content

RussellDash332/Project-Euler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Euler

Stats Python

Basically all my Project Euler relevant codes, mainly in Python. I have put all the current necessary resources on the "resources" folder.

You can also do Project Euler+ by HackerRank here.

Some functions where you can import from

  • check_primes
    • is_prime, checks whether a positive integer is a prime number
    • is_composite, the exact opposite of is_prime
    • sieve, returns a list of all prime numbers up to the input integer
  • check_sequences
    • is_triangle, checks whether an integer is in the form n(n+1)/2
    • is_square, checks whether an integer is in the form n**2
    • is_pentagonal, checks whether an integer is in the form n(3n-1)/2
    • is_hexagonal, checks whether an integer is in the form n(2n-1)
    • is_heptagonal, checks whether an integer is in the form n(5n-3)/2
    • is_octagonal, checks whether an integer is in the form n(3n-2)
  • choose
    • binom, takes two integers n and r, returning nCr
  • number_theory
    • gcd, takes two integer inputs and returns the GCD of both integers
    • lcm, takes two integer inputs and returns the LCM of both integers
    • factorial, returns the factorial of the integer input
    • factor, returns the number of positive factors of the input integer
    • sum_factor, returns the sum of all positive factors of the input integer
    • fib, returns the n-th Fibonacci number, where n is the input
    • congruence, takes three integer inputs a, b, m and solves for x where ax = b mod m
  • palindromes
    • is_palindromic, checks whether an integer or string-ized integer is a palindrome

Noob Notes 🤪

Some problems are solved using sequences (lists, tuples, dictionaries, etc) which is computationally more expensive compared to assigning and modifying a constant number of variables. This is because it was done a very long time ago. For now, I've only decided to improve some, especially the first problems. Maybe more in the future.

Releases

No releases published

Packages

No packages published

Languages