結果

問題 No.987 N×Mマス計算(基本)
ユーザー splash9494splash9494
提出日時 2020-05-05 18:49:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 336 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 86,720 KB
実行使用メモリ 76,500 KB
最終ジャッジ日時 2023-09-09 07:17:13
合計ジャッジ時間 3,277 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,244 KB
testcase_01 AC 72 ms
71,240 KB
testcase_02 AC 86 ms
76,468 KB
testcase_03 AC 84 ms
76,404 KB
testcase_04 AC 88 ms
76,312 KB
testcase_05 AC 83 ms
76,324 KB
testcase_06 AC 85 ms
76,500 KB
testcase_07 AC 85 ms
76,408 KB
testcase_08 AC 73 ms
70,976 KB
testcase_09 AC 75 ms
71,012 KB
testcase_10 AC 75 ms
71,108 KB
testcase_11 AC 85 ms
76,180 KB
testcase_12 AC 86 ms
76,272 KB
testcase_13 AC 84 ms
76,412 KB
testcase_14 AC 72 ms
71,260 KB
testcase_15 AC 81 ms
76,180 KB
testcase_16 AC 83 ms
76,356 KB
testcase_17 AC 83 ms
76,404 KB
testcase_18 AC 85 ms
76,312 KB
testcase_19 AC 86 ms
76,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N, M = map(int, input().split())
lf = input().split()
op = lf[0]
Bs = list(map(int, lf[1:]))
As = [int(input()) for _ in range(N)]

calc = (lambda x, y: x + y) if op == '+' else (lambda x, y: x * y)

for j in range(N):
    for i in range(M):
        print(calc(Bs[i], As[j]), end=' ')
    print()
0