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 0 :
Find the sum of all the odd squares which do not exceed 764000.
这是注册问题。
"""
UP_NUM = 764000
def is_even(num: int) -> bool:
"""Check if a number is even."""
return num & 1 == 0
def main():
res: list[int] = []
for i in range(UP_NUM):
t = (i + 1) ** 2
if not is_even(t):
res.append(t)
print(sum(res))
if __name__ == "__main__":
main()