結果

問題 No.988 N×Mマス計算(総和)
ユーザー 💕💖💞💕💖💞
提出日時 2020-03-31 16:35:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 10,784 KB
実行使用メモリ 825,204 KB
最終ジャッジ日時 2023-09-20 12:20:29
合計ジャッジ時間 4,981 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
29,608 KB
testcase_01 AC 148 ms
29,660 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 145 ms
29,532 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 143 ms
29,576 KB
testcase_08 AC 142 ms
29,660 KB
testcase_09 AC 135 ms
29,568 KB
testcase_10 RE -
testcase_11 MLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

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