結果

問題 No.3534 Make Many Fences
コンテスト
ユーザー BlessW
提出日時 2026-05-18 15:52:58
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 243 ms / 1,000 ms
コード長 320 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 657 ms
コンパイル使用メモリ 20,568 KB
実行使用メモリ 36,024 KB
最終ジャッジ日時 2026-05-18 15:53:02
合計ジャッジ時間 3,130 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
純コード判定待ち
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys

data = list(map(int, sys.stdin.read().split()))

T = data[0]
index = 1

for _ in range(T):
    N = data[index]
    M = data[index + 1]
    index += 2
    make = min(N // 4, M // 2)
    N -= make * 4
    M -= make * 2
    make += (N // 10) * 2
    N %= 10
    if N >= 6:
        make += 1

    print(make * 3)
0