上传文件至 /

This commit is contained in:
2026-04-21 11:27:27 +08:00
parent f99d9e76e4
commit c929b11229
3 changed files with 39 additions and 0 deletions

12
main.py Normal file
View File

@@ -0,0 +1,12 @@
import math
A = [3, 4]
B = [1, 2]
A_plus_B = [a + b for a, b in zip(A, B)]
print("A + B 的结果:", A_plus_B)
A_scaled = [2 * a for a in A]
print("2 × A 的结果:", A_scaled)
A_norm = math.sqrt(sum(a**2 for a in A))
print("A 的长度(模):", A_norm)