結果

問題 No.987 N×Mマス計算(基本)
ユーザー tter4tter4
提出日時 2020-02-14 21:36:10
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 370 bytes
コンパイル時間 1,518 ms
コンパイル使用メモリ 86,944 KB
実行使用メモリ 76,644 KB
最終ジャッジ日時 2023-07-28 17:29:48
合計ジャッジ時間 3,319 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,360 KB
testcase_01 AC 72 ms
71,456 KB
testcase_02 AC 93 ms
76,636 KB
testcase_03 AC 84 ms
76,576 KB
testcase_04 AC 86 ms
76,496 KB
testcase_05 AC 82 ms
76,488 KB
testcase_06 AC 83 ms
76,488 KB
testcase_07 AC 84 ms
76,496 KB
testcase_08 AC 74 ms
71,464 KB
testcase_09 AC 78 ms
71,432 KB
testcase_10 AC 76 ms
71,276 KB
testcase_11 AC 85 ms
76,388 KB
testcase_12 AC 86 ms
76,520 KB
testcase_13 AC 86 ms
76,644 KB
testcase_14 AC 75 ms
71,356 KB
testcase_15 AC 85 ms
76,368 KB
testcase_16 AC 87 ms
76,540 KB
testcase_17 AC 87 ms
76,420 KB
testcase_18 AC 86 ms
76,384 KB
testcase_19 AC 87 ms
76,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
opb = list(map(str, input().split()))
op = opb[0]
b = [int(x) for x in opb[1:]]
a = [int(input()) for _ in range(n)]

ans = [[] for _ in range(n)]
for i in range(n):
    for j in range(m):
        if op == '+':
            ans[i].append(a[i]+b[j])
        else:
            ans[i].append(a[i]*b[j])

for i in range(n):
    print(*ans[i])
0