結果

問題 No.987 N×Mマス計算(基本)
ユーザー NoviNovi
提出日時 2020-06-08 21:26:20
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 376 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,832 KB
実行使用メモリ 8,244 KB
最終ジャッジ日時 2023-08-27 03:21:41
合計ジャッジ時間 1,880 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,904 KB
testcase_01 AC 15 ms
7,784 KB
testcase_02 AC 20 ms
7,728 KB
testcase_03 AC 17 ms
8,236 KB
testcase_04 AC 20 ms
7,836 KB
testcase_05 AC 18 ms
7,752 KB
testcase_06 AC 20 ms
8,244 KB
testcase_07 AC 18 ms
8,244 KB
testcase_08 AC 16 ms
7,784 KB
testcase_09 AC 15 ms
7,864 KB
testcase_10 AC 16 ms
7,812 KB
testcase_11 AC 20 ms
7,756 KB
testcase_12 AC 21 ms
7,840 KB
testcase_13 AC 17 ms
7,908 KB
testcase_14 AC 16 ms
7,848 KB
testcase_15 AC 18 ms
7,780 KB
testcase_16 AC 21 ms
7,848 KB
testcase_17 AC 20 ms
7,840 KB
testcase_18 AC 22 ms
7,904 KB
testcase_19 AC 24 ms
7,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
ch=list(map(str,input().split()))
a=[int(input()) for i in range(n)]
if ch[0]=="+":
    for i in range(n):
        ans=[]
        for j in range(1,m+1):
            ans.append(a[i]+int(ch[j]))
        print(*ans)
else:
    for i in range(n):
        ans=[]
        for j in range(1,m+1):
            ans.append(a[i]*int(ch[j]))
        print(*ans)
0