結果

問題 No.988 N×Mマス計算(総和)
ユーザー ohanaohana
提出日時 2023-10-30 10:40:47
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 310 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 81,832 KB
実行使用メモリ 82,824 KB
最終ジャッジ日時 2023-10-30 10:40:53
合計ジャッジ時間 6,032 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
57,924 KB
testcase_01 AC 36 ms
53,576 KB
testcase_02 AC 41 ms
59,492 KB
testcase_03 AC 41 ms
59,492 KB
testcase_04 AC 36 ms
53,576 KB
testcase_05 AC 40 ms
59,492 KB
testcase_06 AC 40 ms
59,492 KB
testcase_07 AC 41 ms
59,492 KB
testcase_08 AC 40 ms
59,492 KB
testcase_09 AC 37 ms
53,576 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

h, w, k = map(int, input().split())


t = input().split()
ope, X = t[0], list(map(int, t[1:]))
Y = [int(input()) for i in range(h)]

sm = 0
for i in range(h):
    for j in range(w):
        if ope == "+":
            sm = (sm + Y[i] + X[j]) % k
        else:
            sm = (sm + Y[i] * X[j]) % k

print(sm)
0