Atcoder Begineer Contest 121 B問題に関して、質問です。
調べてもエラー文の意味が分からず、自力で解決できない状況です。
なぜこのエラー文が出ているのでしょうか?ご教示頂けると幸いです。
[https://atcoder.jp/contests/abc121/tasks/abc121_b]
#以下私のコードです
n,m,c = map(int, input().split())
b = list(map(int,input().split()))
a = list(map(int, input().split()))
s = 0
numbers = 0
for i in range(n):
for j in range(m):
s += a[i][j]*b[j]
if s + c >= 0:
numbers += 1
print(numbers)
#エラー文
Traceback (most recent call last):
File "./Main.py", line 12, in <module>
s += a[i][j]*b[j]
TypeError: 'int' object is not subscriptable
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2019/06/19 14:21