結果

問題 No.988 N×Mマス計算(総和)
ユーザー shika_126shika_126
提出日時 2022-04-09 01:03:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 244 ms / 2,000 ms
コード長 225 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 10,760 KB
実行使用メモリ 16,016 KB
最終ジャッジ日時 2023-08-19 03:25:19
合計ジャッジ時間 4,548 ms
ジャッジサーバーID
(参考情報)
judge13 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,940 KB
testcase_01 AC 16 ms
7,732 KB
testcase_02 AC 16 ms
7,940 KB
testcase_03 AC 16 ms
7,796 KB
testcase_04 AC 17 ms
7,752 KB
testcase_05 AC 15 ms
7,960 KB
testcase_06 AC 16 ms
7,844 KB
testcase_07 AC 16 ms
7,768 KB
testcase_08 AC 16 ms
7,916 KB
testcase_09 AC 15 ms
7,728 KB
testcase_10 AC 95 ms
9,864 KB
testcase_11 AC 44 ms
15,344 KB
testcase_12 AC 163 ms
15,752 KB
testcase_13 AC 62 ms
12,372 KB
testcase_14 AC 51 ms
12,364 KB
testcase_15 AC 126 ms
7,752 KB
testcase_16 AC 161 ms
12,708 KB
testcase_17 AC 192 ms
14,080 KB
testcase_18 AC 52 ms
14,460 KB
testcase_19 AC 156 ms
14,620 KB
testcase_20 AC 244 ms
16,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,k = map(int,input().split())
p,*a = input().split()
a = sum(map(int,a))
s = 0
if p =='*':
    for i in range(n):
        s += int(input())*a
else:
    for i in range(n):
        s += int(input())*m
    s += a*n
print(s%k)
0