結果
| 問題 | No.2958 Placing Many L-s |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-24 20:05:17 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 603 bytes |
| 記録 | |
| コンパイル時間 | 185 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2026-09-21 12:12:51 |
| 合計ジャッジ時間 | 4,655 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 29 |
ソースコード
import re
import sys
content = input()
pattern = r'^(\d+)$'
result = re.match(pattern, content)
if not result:
sys.exit("format error.")
T = int(content)
if not (1 <= T and T <= 500):
sys.exit("T")
sum = 0
for t in range(T):
content = input()
pattern = r'^(\d+) (\d+)$'
result = re.match(pattern, content)
if not result:
sys.exit("format error.")
N, M = map(int, content.split())
if not (1 <= N and N <= 500):
sys.exit("N")
if not (1 <= M and M <= 500):
sys.exit("M")
sum += N * M
if not (sum <= 3 * 10**5):
sys.exit("sum")