Skip to content
12 changes: 12 additions & 0 deletions project_euler/problem_56/sol1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
high=0
for a in range(1,100):
for b in range(1,100):
c=0
for k in list(str(a**b)):
c+=int(k)
if c>high:
high=c


print(high)
#972--answer
21 changes: 21 additions & 0 deletions project_euler/problem_58/sol1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from sympy import *

numofprime=0
con=1
lis=[1]
i=3
while True:
for j in range(4):
con+=i-1
lis.append(con)

for k in lis[-4:]:
if isprime(k)==True:
numofprime+=1
if numofprime/len(lis)<0.1:
print(i)
break
i+=2

#26241-answer

14 changes: 14 additions & 0 deletions project_euler/problem_63/sol1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
The reason i have choosen 25 is because any number which when is raised to the power of 25 gradually increases from
8 digits of 2^25 linearly(at first with a diffrence of 4(that is num_of_digit in 2^25 is 8 and 3^25 id 12) which starts
halfening) ,hence all the sollution must lie for numbers below 25 only, since any number x^(any_num_greater_than_25) is
greater than x^25.
"""

count=0
for i in range(1,25):
for t in range(1,25):
if len(str(t**i))==i:
count+=1
print(count)
# 49 -- answer