結果

問題 No.988 N×Mマス計算(総和)
ユーザー pluto77pluto77
提出日時 2020-02-24 09:46:09
言語 Python2
(2.7.18)
結果
AC  
実行時間 246 ms / 2,000 ms
コード長 248 bytes
コンパイル時間 594 ms
コンパイル使用メモリ 6,580 KB
実行使用メモリ 21,312 KB
最終ジャッジ日時 2023-09-20 12:10:25
合計ジャッジ時間 3,357 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
5,908 KB
testcase_01 AC 11 ms
5,928 KB
testcase_02 AC 11 ms
5,928 KB
testcase_03 AC 12 ms
5,924 KB
testcase_04 AC 12 ms
6,020 KB
testcase_05 AC 11 ms
5,940 KB
testcase_06 AC 11 ms
5,936 KB
testcase_07 AC 11 ms
5,868 KB
testcase_08 AC 12 ms
6,020 KB
testcase_09 AC 12 ms
5,900 KB
testcase_10 AC 86 ms
10,264 KB
testcase_11 AC 81 ms
16,568 KB
testcase_12 AC 175 ms
18,060 KB
testcase_13 AC 77 ms
12,512 KB
testcase_14 AC 69 ms
12,580 KB
testcase_15 AC 107 ms
9,380 KB
testcase_16 AC 164 ms
15,276 KB
testcase_17 AC 199 ms
17,568 KB
testcase_18 AC 82 ms
15,448 KB
testcase_19 AC 167 ms
17,064 KB
testcase_20 AC 246 ms
21,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki987
n,m,k=map(int,raw_input().split())
op=raw_input().split()
b=[]
for i in range(1,len(op)):
 b.append(int(op[i]))
a=[]
for i in range(n):
 a.append(int(raw_input()))
if op[0]=='+':
 print (sum(a)*m+sum(b)*n)%k
else:
 print (sum(a)*sum(b))%k
0