7 # print(
8 # total1 - (total2**2)
9 # )
10 return (sum(i for i in range(0, 101))**2) - sum(i**2 for i in range(0, 101)) 11
12print(main())
16 res = requests.get(f"https://projecteuler.net/problem={i}")
17 with open(f"html/p{str(i).zfill(3)}.html", "w", encoding="utf-8") as pfile:
18 soup = BeautifulSoup(res.text, "html.parser")
19 pfile.write(soup.prettify()) 20 DOWNLOADED = True_
21
22minimal = True
8 res = requests.get(f"https://projecteuler.net/minimal={i}")
9 with open(f"html/p{str(i).zfill(3)}-MINIMAL.html", "w", encoding="utf-8") as pfile:
10 soup = BeautifulSoup(res.text, "html.parser")
11 pfile.write(soup.prettify()) 12 DOWNLOADED = True_
13
14def downloadAll():
110 Parameters:
111 num : Number - the number you want to get floored sqrt of
112 Returns:
113 int - the nth root of num floored 114 """
115 return math.floor(nthRoot(n, 2))
116
64 return set(sorted(set(list(str(n))))) == set(sorted(set([str(i) for i in range(0, until+1)])))
65
66# Credits to Project Nayuki
67# 68# https://www.nayuki.io/page/project-euler-solutions
69#
70# https://github.com/nayuki/Project-Euler-solutions
There should be no whitespace after the final character in a line.