Renamed all folders

This commit is contained in:
2021-04-16 16:58:48 +02:00
parent dbc6cfef05
commit 197b3eea8a
62 changed files with 0 additions and 0 deletions

39
012/main.py Normal file
View File

@@ -0,0 +1,39 @@
import os
import math
import numpy as np
# Triangle numbers are simply the sum of all natural numbers.
# Then, find the first triangle number that has over five hundred divisors.
def getTriangle(n):
# return sum(range(1, n + 1))
# Instead just use the formula like any normal human being
return int(n * (n+1) / 2)
def getTriangles(n):
return [getTriangle(x) for x in range(1, n + 1)]
def getNumberOfDivs(n):
# Fuck this function
def main():
print("Hello, this is Patrick")
ts = getTriangles(7)
print(ts)
for t in ts:
print(getNumberOfDivs(t))
if __name__ == "__main__":
main()