結果

問題 No.988 N×Mマス計算(総和)
ユーザー titiatitia
提出日時 2020-02-14 21:31:16
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 225 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 24,124 KB
最終ジャッジ日時 2023-09-20 11:33:00
合計ジャッジ時間 2,612 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,840 KB
testcase_01 AC 15 ms
7,880 KB
testcase_02 AC 16 ms
7,896 KB
testcase_03 AC 16 ms
7,884 KB
testcase_04 AC 16 ms
7,832 KB
testcase_05 AC 16 ms
7,912 KB
testcase_06 AC 16 ms
7,812 KB
testcase_07 AC 16 ms
7,840 KB
testcase_08 AC 16 ms
7,776 KB
testcase_09 AC 16 ms
7,928 KB
testcase_10 AC 86 ms
12,060 KB
testcase_11 AC 49 ms
18,864 KB
testcase_12 AC 149 ms
21,616 KB
testcase_13 AC 61 ms
15,416 KB
testcase_14 AC 51 ms
15,016 KB
testcase_15 AC 113 ms
10,624 KB
testcase_16 AC 154 ms
17,340 KB
testcase_17 AC 178 ms
20,164 KB
testcase_18 AC 55 ms
17,708 KB
testcase_19 AC 148 ms
20,640 KB
testcase_20 AC 225 ms
24,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,K=map(int,input().split())
B=list(input().split())
A=[int(input()) for i in range(N)]

if B[0]=="+":
    print((sum(A)*M+sum(list(map(int,B[1:])))*N)%K)
else:
    print(sum(A)*sum(list(map(int,B[1:])))%K)
0