結果

問題 No.987 N×Mマス計算(基本)
ユーザー NagisaNagisa
提出日時 2020-02-14 21:25:27
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 429 bytes
コンパイル時間 430 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 8,600 KB
最終ジャッジ日時 2023-07-28 17:22:34
合計ジャッジ時間 1,809 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,972 KB
testcase_01 AC 15 ms
7,896 KB
testcase_02 AC 21 ms
8,372 KB
testcase_03 AC 17 ms
8,332 KB
testcase_04 AC 20 ms
8,236 KB
testcase_05 AC 20 ms
8,240 KB
testcase_06 AC 20 ms
8,372 KB
testcase_07 AC 18 ms
8,336 KB
testcase_08 AC 15 ms
7,864 KB
testcase_09 AC 16 ms
7,788 KB
testcase_10 AC 16 ms
7,976 KB
testcase_11 AC 20 ms
8,360 KB
testcase_12 AC 21 ms
8,272 KB
testcase_13 AC 17 ms
8,236 KB
testcase_14 AC 15 ms
7,808 KB
testcase_15 AC 18 ms
8,328 KB
testcase_16 AC 22 ms
8,172 KB
testcase_17 AC 19 ms
8,204 KB
testcase_18 AC 21 ms
8,548 KB
testcase_19 AC 25 ms
8,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int,input().split())
B = input().split()
ans = []
if B[0] == "+":
    for k in range(N):
        temp = []
        A = int(input())
        for l in range(1,M+1):
            temp.append(A+int(B[l]))
        ans.append(temp)
else:
    for k in range(N):
        temp = []
        A = int(input())
        for l in range(1,M+1):
            temp.append(A*int(B[l]))
        ans.append(temp)
for e in ans:
    print(*e)
0