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