結果

問題 No.988 N×Mマス計算(総和)
ユーザー 💕💖💞
提出日時 2020-03-31 16:35:32
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 68 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 828,352 KB
最終ジャッジ日時 2024-07-06 07:40:18
合計ジャッジ時間 8,056 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 4 WA * 4 RE * 1 MLE * 1 -- * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
n,m,k = map(int, input().split())
l1 = input().split()
op = l1.pop(0)
bs = np.array(list(map(int, l1)))
ax = np.array([int(input()) for a in range(n)])
if op == '+':
    print( (bs.sum() * n  + ax.sum() * m) % k)
else:
    x = bs * ax.reshape((1, n)).T 
    print(x.sum()%k)
0