Symbol(clack:cancel)

This commit is contained in:
2025-12-26 17:35:14 +08:00
parent 266544ac47
commit 25469e1022
54 changed files with 0 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()