結果

問題 No.988 N×Mマス計算(総和)
ユーザー komkompikomkompi
提出日時 2020-03-08 12:33:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 243 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 23,972 KB
最終ジャッジ日時 2023-09-20 12:13:57
合計ジャッジ時間 2,766 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,808 KB
testcase_01 AC 15 ms
7,800 KB
testcase_02 AC 16 ms
7,900 KB
testcase_03 AC 15 ms
7,872 KB
testcase_04 AC 17 ms
7,944 KB
testcase_05 AC 17 ms
7,804 KB
testcase_06 AC 16 ms
7,856 KB
testcase_07 AC 16 ms
7,820 KB
testcase_08 AC 15 ms
7,884 KB
testcase_09 AC 16 ms
7,788 KB
testcase_10 AC 92 ms
12,108 KB
testcase_11 AC 50 ms
18,864 KB
testcase_12 AC 158 ms
21,264 KB
testcase_13 AC 64 ms
15,324 KB
testcase_14 AC 53 ms
15,100 KB
testcase_15 AC 124 ms
10,692 KB
testcase_16 AC 164 ms
17,372 KB
testcase_17 AC 193 ms
20,196 KB
testcase_18 AC 58 ms
17,788 KB
testcase_19 AC 158 ms
20,088 KB
testcase_20 AC 243 ms
23,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,K=map(int,input().split())
temp=list(input().split())
col=list(map(int,temp[1:]))
data=[]
for i in range(N):
    data.append(int(input()))


if temp[0]=="+":
    print((sum(col)*N+sum(data)*M)%K)
else:
    print((sum(col)*sum(data))%K)

#print(col)
#print(data)
0