結果
| 問題 |
No.988 N×Mマス計算(総和)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-02-14 21:56:09 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 396 bytes |
| コンパイル時間 | 125 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 20,256 KB |
| 最終ジャッジ日時 | 2024-07-06 07:13:42 |
| 合計ジャッジ時間 | 4,204 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 TLE * 1 -- * 10 |
ソースコード
#!/usr/bin/env python3
import operator
def main():
h, w, k = map(int, input().split())
op, *b = input().split()
b = list(map(int, b))
if op == '+':
f = operator.add
elif op == '*':
f = operator.mul
c = 0
for _ in range(h):
a_y = int(input())
c += sum([ f(a_y, b_x) for b_x in b ])
print(c % k)
if __name__ == "__main__":
main()