結果

問題 No.988 N×Mマス計算(総和)
ユーザー neterukunneterukun
提出日時 2020-02-14 21:28:30
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 153 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 327 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 91,632 KB
最終ジャッジ日時 2023-09-20 11:31:14
合計ジャッジ時間 3,642 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,352 KB
testcase_01 AC 75 ms
71,224 KB
testcase_02 AC 78 ms
71,276 KB
testcase_03 AC 76 ms
71,156 KB
testcase_04 AC 75 ms
71,424 KB
testcase_05 AC 74 ms
71,212 KB
testcase_06 AC 74 ms
71,152 KB
testcase_07 AC 75 ms
71,164 KB
testcase_08 AC 75 ms
71,392 KB
testcase_09 AC 75 ms
71,016 KB
testcase_10 AC 115 ms
79,756 KB
testcase_11 AC 117 ms
89,960 KB
testcase_12 AC 138 ms
91,360 KB
testcase_13 AC 114 ms
84,404 KB
testcase_14 AC 113 ms
84,192 KB
testcase_15 AC 118 ms
77,580 KB
testcase_16 AC 131 ms
84,712 KB
testcase_17 AC 140 ms
88,732 KB
testcase_18 AC 117 ms
88,868 KB
testcase_19 AC 136 ms
89,700 KB
testcase_20 AC 153 ms
91,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, k = list(map(int, input().split()))
op = list(input().split())
b = [int(op[i]) for i in range(1, m + 1)]
a = [int(input()) for i in range(n)]

if op[0] == "+":
    ans = sum(a) * m + sum(b) *n
    print(ans % k)
else:
    ans = sum(a)* sum(b)
    print(ans % k)
0