結果

問題 No.987 N×Mマス計算(基本)
ユーザー 8ayac8ayac
提出日時 2020-02-14 21:44:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 65,920 KB
最終ジャッジ日時 2024-04-16 01:42:41
合計ジャッジ時間 2,115 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
51,968 KB
testcase_01 AC 42 ms
52,096 KB
testcase_02 AC 63 ms
64,256 KB
testcase_03 AC 59 ms
62,336 KB
testcase_04 AC 61 ms
63,872 KB
testcase_05 AC 59 ms
63,232 KB
testcase_06 AC 60 ms
64,000 KB
testcase_07 AC 62 ms
62,848 KB
testcase_08 AC 45 ms
52,736 KB
testcase_09 AC 45 ms
52,864 KB
testcase_10 AC 46 ms
53,120 KB
testcase_11 AC 61 ms
64,000 KB
testcase_12 AC 62 ms
64,512 KB
testcase_13 AC 59 ms
62,720 KB
testcase_14 AC 44 ms
52,736 KB
testcase_15 AC 60 ms
62,720 KB
testcase_16 AC 62 ms
64,384 KB
testcase_17 AC 61 ms
64,128 KB
testcase_18 AC 61 ms
64,384 KB
testcase_19 AC 65 ms
65,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
tmp = input().split()
op, B = tmp[0], tmp[1:]
A = [input() for _ in range(N)]

if op == '+':
    for a in A:
        tmp = []
        for b in B:
            tmp.append(int(a)+int(b))
        print(*tmp)
if op == '*':
    for a in A:
        tmp = []
        for b in B:
            tmp.append(int(a)*int(b))
        print(*tmp)
0