結果
問題 | No.988 N×Mマス計算(総和) |
ユーザー |
|
提出日時 | 2023-10-06 22:52:14 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 251 bytes |
コンパイル時間 | 372 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 21,024 KB |
最終ジャッジ日時 | 2024-07-26 16:48:27 |
合計ジャッジ時間 | 4,827 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 TLE * 1 -- * 10 |
ソースコード
n, m, k = [int(x) for x in input().split()] b = input().split() op = b.pop(0) b = list(map(int, b)) a = [int(input()) for _ in range(n)] s = 0 for aa in a: if op == "+": s += sum(b) + aa * m else: s += sum(b) * aa print(s % k)