結果

問題 No.987 N×Mマス計算(基本)
ユーザー zer0zer0
提出日時 2020-03-25 23:19:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 346 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,912 KB
実行使用メモリ 8,608 KB
最終ジャッジ日時 2023-08-30 11:51:56
合計ジャッジ時間 1,719 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,788 KB
testcase_01 AC 16 ms
7,844 KB
testcase_02 AC 21 ms
8,300 KB
testcase_03 AC 18 ms
8,304 KB
testcase_04 AC 20 ms
8,200 KB
testcase_05 AC 18 ms
8,296 KB
testcase_06 AC 20 ms
8,532 KB
testcase_07 AC 17 ms
8,192 KB
testcase_08 AC 16 ms
7,904 KB
testcase_09 AC 16 ms
7,844 KB
testcase_10 AC 16 ms
7,776 KB
testcase_11 AC 20 ms
8,292 KB
testcase_12 AC 21 ms
8,368 KB
testcase_13 AC 17 ms
8,340 KB
testcase_14 AC 15 ms
7,936 KB
testcase_15 AC 18 ms
8,196 KB
testcase_16 AC 22 ms
8,204 KB
testcase_17 AC 20 ms
8,276 KB
testcase_18 AC 21 ms
8,396 KB
testcase_19 AC 25 ms
8,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
b = list(map(str, input().split()))
a = [int(input()) for _ in range(N)]
ans = []
for i in range(N):
    tmp = []
    for j in range(1, M + 1):
        if b[0] == '+':
            tmp.append(int(b[j]) + a[i])
        else:
            tmp.append(int(b[j]) * a[i])

    ans.append(tmp)

for i in ans:
    print(*i)
0