結果

問題 No.987 N×Mマス計算(基本)
ユーザー neterukunneterukun
提出日時 2020-02-14 21:23:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 344 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 65,152 KB
最終ジャッジ日時 2024-04-16 01:25:30
合計ジャッジ時間 2,169 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
51,840 KB
testcase_01 AC 46 ms
51,968 KB
testcase_02 AC 63 ms
63,744 KB
testcase_03 AC 64 ms
63,616 KB
testcase_04 AC 64 ms
63,104 KB
testcase_05 AC 61 ms
62,848 KB
testcase_06 AC 62 ms
63,744 KB
testcase_07 AC 62 ms
63,360 KB
testcase_08 AC 47 ms
52,864 KB
testcase_09 AC 47 ms
52,608 KB
testcase_10 AC 47 ms
52,736 KB
testcase_11 AC 63 ms
63,744 KB
testcase_12 AC 64 ms
64,000 KB
testcase_13 AC 64 ms
63,232 KB
testcase_14 AC 46 ms
52,608 KB
testcase_15 AC 62 ms
62,720 KB
testcase_16 AC 65 ms
64,000 KB
testcase_17 AC 63 ms
63,488 KB
testcase_18 AC 64 ms
64,000 KB
testcase_19 AC 65 ms
65,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = list(map(int, input().split()))
op = list(input().split())
b = op[1:]
a = [int(input()) for i in range(n)]

ans = [[0] * m for i in range(n)]

for i in range(n):
    for j in range(m):
        if op[0] == "+":
            ans[i][j] = a[i] + int(b[j])
        else:
            ans[i][j] = a[i] * int(b[j])
for res in ans:
    print(*res)
0