結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
29,548 KB
testcase_01 AC 133 ms
29,480 KB
testcase_02 AC 132 ms
29,636 KB
testcase_03 WA -
testcase_04 AC 134 ms
29,572 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 135 ms
29,600 KB
testcase_08 AC 139 ms
29,504 KB
testcase_09 AC 140 ms
29,544 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))) % 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