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 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()