結果
問題 |
No.988 N×Mマス計算(総和)
|
ユーザー |
![]() |
提出日時 | 2020-02-15 03:10:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 284 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 19,196 KB |
最終ジャッジ日時 | 2024-07-06 07:22:09 |
合計ジャッジ時間 | 2,995 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 19 |
ソースコード
n, m, s = map(int, input().split()) x = input().split() j = 1 for i in range(len(x) - 1): x[j] = (int(x[j])) % s j += 1 y = [(int(input())) % s for i in range(n)] sum = 0 if x[0] == "+": sum = m * sum(y) + n * sum(x[1:]) else: sum = sum(x[1:]) * sum(y) print(sum % s)