created and first commit(3 solusions)

This commit is contained in:
2025-11-26 15:31:14 +08:00
commit d1af6aa880
11 changed files with 259 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
"""
Project Euler Problem 1 :
Find the sum of all the multiples of 3 or 5 below 1000.
"""
UP_NUM = 1000
def condition(num: int) -> bool:
if num % 3 == 0:
return True
elif num % 5 == 0:
return True
return False
def main():
res = []
for i in range(1, UP_NUM):
if condition(i):
res.append(i)
print(sum(res))
if __name__ == "__main__":
main()