結果
| 問題 |
No.987 N×Mマス計算(基本)
|
| コンテスト | |
| ユーザー |
splash9494
|
| 提出日時 | 2020-05-05 18:49:01 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 55 ms / 2,000 ms |
| コード長 | 336 bytes |
| コンパイル時間 | 293 ms |
| コンパイル使用メモリ | 82,368 KB |
| 実行使用メモリ | 64,000 KB |
| 最終ジャッジ日時 | 2024-06-27 00:25:14 |
| 合計ジャッジ時間 | 2,171 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
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()
splash9494