結果
| 問題 | No.3534 Make Many Fences |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-15 18:50:22 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 605 bytes |
| 記録 | |
| コンパイル時間 | 473 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 15,484 KB |
| 最終ジャッジ日時 | 2026-05-15 18:50:30 |
| 合計ジャッジ時間 | 3,920 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 2 WA * 7 |
ソースコード
T = int(input())
Z = 0
for _ in range(T):
N, M = map(int, input().split())
if N == 0 and M == 0:
Z = 0
elif N == 0:
Z = 0
elif N > 0 and M >= 0:
S1 = N // 4
S2 = M // 2
if S1 == S2:
Z = S1 * 3
elif S1 < S2:
Z = S1 * 3
else:
while N >= 2 and M < 2:
N = N - 2
M = M + 4
if N >= 4 and M >= 2:
M = M - 2
N = N - 4
Z = Z + 3
elif N < 2:
break
print(Z)