結果
| 問題 |
No.988 N×Mマス計算(総和)
|
| コンテスト | |
| ユーザー |
toshiro_yanagi
|
| 提出日時 | 2020-07-18 19:01:48 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 333 bytes |
| コンパイル時間 | 185 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 20,280 KB |
| 最終ジャッジ日時 | 2024-07-06 08:02:38 |
| 合計ジャッジ時間 | 4,304 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 TLE * 1 -- * 10 |
ソースコード
n, m, k = map(int, input().split())
tmp = list(input().split())
tmp.reverse()
op = tmp.pop()
B = [int(tmp.pop()) for i in range(m)]
A = [int(input()) for i in range(n)]
ans = 0
for a in A:
for b in B:
if op == "+":
ans += a + b
elif op == "*":
ans += a * b
ans %= k
print(ans)
toshiro_yanagi