結果

問題 No.988 N×Mマス計算(総和)
ユーザー 💕💖💞
提出日時 2020-03-31 16:43:46
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 302 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 828,568 KB
最終ジャッジ日時 2024-07-06 07:40:27
合計ジャッジ時間 7,979 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5 WA * 3 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))) % k

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