結果

問題 No.988 N×Mマス計算(総和)
ユーザー pete1288998pete1288998
提出日時 2020-06-21 01:39:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 243 ms / 2,000 ms
コード長 258 bytes
コンパイル時間 537 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 24,040 KB
最終ジャッジ日時 2023-09-20 12:40:00
合計ジャッジ時間 2,681 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,784 KB
testcase_01 AC 16 ms
7,892 KB
testcase_02 AC 15 ms
7,788 KB
testcase_03 AC 16 ms
7,948 KB
testcase_04 AC 15 ms
7,824 KB
testcase_05 AC 16 ms
7,860 KB
testcase_06 AC 16 ms
7,780 KB
testcase_07 AC 16 ms
7,780 KB
testcase_08 AC 15 ms
7,856 KB
testcase_09 AC 16 ms
7,960 KB
testcase_10 AC 95 ms
12,304 KB
testcase_11 AC 52 ms
18,964 KB
testcase_12 AC 165 ms
21,244 KB
testcase_13 AC 66 ms
15,252 KB
testcase_14 AC 56 ms
14,984 KB
testcase_15 AC 127 ms
10,576 KB
testcase_16 AC 166 ms
17,452 KB
testcase_17 AC 197 ms
20,168 KB
testcase_18 AC 60 ms
17,596 KB
testcase_19 AC 163 ms
20,028 KB
testcase_20 AC 243 ms
24,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,k = map(int,input().split())

l = list(input().split())
op = l[0]
b = l[1:]
b = [int(i) for i in b]

a = []
for i in range(n):
    a.append(int(input()))

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