結果
| 問題 |
No.988 N×Mマス計算(総和)
|
| コンテスト | |
| ユーザー |
ttr
|
| 提出日時 | 2020-02-14 21:30:19 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 331 bytes |
| コンパイル時間 | 77 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 821,048 KB |
| 最終ジャッジ日時 | 2024-07-06 06:56:53 |
| 合計ジャッジ時間 | 2,681 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 4 WA * 4 MLE * 1 -- * 10 |
ソースコード
import sys
input = sys.stdin.buffer.readline
N,M,K = 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])
C = [[0]*M for _ in range(N)]
if op == "+":
ans = (sum(A)*M + sum(B)*N) % K
else:
ans = (sum(A)*sum(B)) % K
print(ans)
ttr