結果

問題 No.988 N×Mマス計算(総和)
ユーザー nehan_der_thalnehan_der_thal
提出日時 2020-02-14 22:01:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 153 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 87,016 KB
実行使用メモリ 96,388 KB
最終ジャッジ日時 2023-09-20 11:56:13
合計ジャッジ時間 3,481 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,176 KB
testcase_01 AC 69 ms
71,388 KB
testcase_02 AC 74 ms
71,392 KB
testcase_03 AC 71 ms
71,312 KB
testcase_04 AC 73 ms
71,184 KB
testcase_05 AC 69 ms
70,956 KB
testcase_06 AC 71 ms
71,304 KB
testcase_07 AC 71 ms
71,432 KB
testcase_08 AC 70 ms
71,080 KB
testcase_09 AC 70 ms
71,180 KB
testcase_10 AC 112 ms
79,928 KB
testcase_11 AC 117 ms
94,720 KB
testcase_12 AC 138 ms
96,360 KB
testcase_13 AC 114 ms
87,880 KB
testcase_14 AC 111 ms
87,748 KB
testcase_15 AC 113 ms
77,180 KB
testcase_16 AC 131 ms
88,432 KB
testcase_17 AC 141 ms
92,380 KB
testcase_18 AC 118 ms
92,636 KB
testcase_19 AC 134 ms
94,196 KB
testcase_20 AC 153 ms
96,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M, L = map(int, input().split())
bs = []
c = 0
for i in range(N+1):
    if i == 0:
        X = input().split()
        e = X[0] == '+'
        b = sum(list(map(int, X[1:])))
        continue
    c += int(input())
if e:
    print((b*N+c*M)%L)
else:
    print(b*c%L)
0