結果
問題 |
No.988 N×Mマス計算(総和)
|
ユーザー |
![]() |
提出日時 | 2020-02-15 03:03:23 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 413 bytes |
コンパイル時間 | 91 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 20,036 KB |
最終ジャッジ日時 | 2024-07-06 07:22:03 |
合計ジャッジ時間 | 4,112 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 TLE * 1 -- * 10 |
ソースコード
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] == "+": for i in y: for j in range(len(x) - 1): sum += (i + x[j + 1]) % s else: for i in y: ax = "" for j in range(len(x) - 1): sum += (i * x[j + 1]) % s print(sum % s)