結果

問題 No.988 N×Mマス計算(総和)
ユーザー ああいいああいい
提出日時 2021-12-24 19:24:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 242 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 11,848 KB
実行使用メモリ 25,248 KB
最終ジャッジ日時 2023-10-19 22:22:25
合計ジャッジ時間 2,918 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,192 KB
testcase_01 AC 29 ms
10,192 KB
testcase_02 AC 30 ms
10,196 KB
testcase_03 AC 30 ms
10,196 KB
testcase_04 AC 29 ms
10,192 KB
testcase_05 AC 29 ms
10,200 KB
testcase_06 AC 29 ms
10,200 KB
testcase_07 AC 29 ms
10,200 KB
testcase_08 AC 29 ms
10,192 KB
testcase_09 AC 33 ms
10,196 KB
testcase_10 AC 101 ms
14,120 KB
testcase_11 AC 61 ms
20,296 KB
testcase_12 AC 167 ms
22,984 KB
testcase_13 AC 76 ms
16,788 KB
testcase_14 AC 65 ms
16,788 KB
testcase_15 AC 133 ms
12,676 KB
testcase_16 AC 172 ms
19,180 KB
testcase_17 AC 199 ms
21,740 KB
testcase_18 AC 67 ms
19,132 KB
testcase_19 AC 165 ms
21,824 KB
testcase_20 AC 242 ms
25,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,K = map(int,input().split())
l = input().split()
op = l[0]
del l[0]
B = list(map(int,l))
A = [int(input()) for _ in range(N)]

if op == '*':
    print((sum(A) % K) * (sum(B) % K) % K)
else:
    print((sum(A) * M + sum(B) * N) % K )
0