結果

問題 No.988 N×Mマス計算(総和)
コンテスト
ユーザー 💕💖💞
提出日時 2020-03-31 16:43:46
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 302 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 547 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 934,476 KB
最終ジャッジ日時 2026-03-27 19:16:44
合計ジャッジ時間 15,273 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 WA * 3 RE * 4 MLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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