Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Project Euler/Problem 03/sol3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from math import sqrt
x=3

while x<=sqrt(600851475143):
y=2
flag=0
while y<=sqrt(x):
if(x%y==0):
flag=1
break
else:
y+=1
if(flag==0 | 600851475143%x==0):
print(x)
x+=1