結果
問題 |
No.988 N×Mマス計算(総和)
|
ユーザー |
![]() |
提出日時 | 2020-02-14 21:27:42 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 311 bytes |
コンパイル時間 | 87 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 21,568 KB |
最終ジャッジ日時 | 2024-07-06 06:54:03 |
合計ジャッジ時間 | 4,132 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 TLE * 1 -- * 10 |
ソースコード
N, M, K = [int(x) for x in input().split()] C = [x for x in input().split()] B = [int(x) for x in C[1:]] A = [int(input()) for _ in range(N)] ans = 0 for j in range(N): for i in range(M): if C[0] == '+': ans += A[j] + B[i] else: ans += A[j] * B[i] print(ans % K)