結果

問題 No.988 N×Mマス計算(総和)
ユーザー osrgy01osrgy01
提出日時 2021-04-17 10:25:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 213 ms / 2,000 ms
コード長 183 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 10,620 KB
実行使用メモリ 16,164 KB
最終ジャッジ日時 2023-09-16 17:00:39
合計ジャッジ時間 3,245 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,940 KB
testcase_01 AC 14 ms
7,760 KB
testcase_02 AC 14 ms
7,876 KB
testcase_03 AC 13 ms
7,836 KB
testcase_04 AC 13 ms
7,772 KB
testcase_05 AC 14 ms
7,776 KB
testcase_06 AC 14 ms
7,928 KB
testcase_07 AC 14 ms
7,768 KB
testcase_08 AC 14 ms
7,848 KB
testcase_09 AC 13 ms
7,840 KB
testcase_10 AC 81 ms
9,820 KB
testcase_11 AC 45 ms
15,424 KB
testcase_12 AC 137 ms
15,740 KB
testcase_13 AC 57 ms
12,472 KB
testcase_14 AC 46 ms
12,332 KB
testcase_15 AC 106 ms
8,208 KB
testcase_16 AC 145 ms
12,668 KB
testcase_17 AC 170 ms
14,128 KB
testcase_18 AC 48 ms
14,396 KB
testcase_19 AC 140 ms
14,764 KB
testcase_20 AC 213 ms
16,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,k=map(int,input().split())
t=input().split()
op=t[0]
M=sum(int(i) for i in t[1:])
N=sum(int(input()) for _ in range(n))
if op=='+':
    print((n*M+m*N)%k)
else:
    print((M*N)%k)
0