結果

問題 No.987 N×Mマス計算(基本)
ユーザー 💕💖💞
提出日時 2020-03-09 12:37:39
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 543 ms / 2,000 ms
コード長 432 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 44,200 KB
最終ジャッジ日時 2024-11-07 20:57:34
合計ジャッジ時間 14,153 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
n, m = map(int, input().split())
m = np.zeros((m,)).astype(int)
n = np.zeros((n,1)).astype(int)
f1 = input().split()
op = f1.pop(0)
for i, a in enumerate(f1):
    #print('de', a)
    m[i] = int(a)
for i in range(len(n)):
    n[i, 0] = int(input())
# print(m)
# print(n)
if op == "+":
    for l in m+n:
        print(' '.join(l.astype(str)))
elif op == "*":
    for l in m*n:
        print(' '.join(l.astype(str)))
0