回答編集履歴
1
test
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
B=0
|
7
7
|
for i in range(3):
|
8
|
-
Ai = locals()
|
8
|
+
Ai = locals().get(f'A{i+1}', 0)
|
9
9
|
B += (i + 1) * Ai
|
10
10
|
|
11
11
|
print(B) # 140
|