結果
問題 |
No.988 N×Mマス計算(総和)
|
ユーザー |
![]() |
提出日時 | 2020-02-14 21:36:29 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 253 bytes |
コンパイル時間 | 120 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-07-06 07:00:51 |
合計ジャッジ時間 | 1,610 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 19 |
ソースコード
N,M = map(int, input().split()) B = [i for i in input().split()] op = B.pop(0) A = [int(input()) for _ in range(N)] for i in range(M): B[i] = int(B[i]) if op == "+": ans = (sum(A)*M + sum(B)*N) % K else: ans = (sum(A)*sum(B)) % K print(ans)