結果
| 問題 | No.3534 Make Many Fences |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-15 18:49:04 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 600 bytes |
| 記録 | |
| コンパイル時間 | 352 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 20,700 KB |
| 最終ジャッジ日時 | 2026-05-15 18:49:10 |
| 合計ジャッジ時間 | 3,474 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 1 |
| other | AC * 2 WA * 3 RE * 4 |
ソースコード
T = int(input())
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)