結果

問題 No.2746 Bicolor Pyramid
ユーザー だれだれ
提出日時 2024-04-20 12:17:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 359 bytes
コンパイル時間 877 ms
コンパイル使用メモリ 82,516 KB
実行使用メモリ 63,360 KB
最終ジャッジ日時 2024-04-20 12:17:42
合計ジャッジ時間 5,995 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
59,392 KB
testcase_01 AC 50 ms
59,104 KB
testcase_02 AC 49 ms
59,264 KB
testcase_03 AC 70 ms
59,264 KB
testcase_04 AC 51 ms
59,264 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 48 ms
59,136 KB
testcase_08 AC 49 ms
59,648 KB
testcase_09 AC 219 ms
63,212 KB
testcase_10 AC 227 ms
63,360 KB
testcase_11 AC 185 ms
62,976 KB
testcase_12 AC 232 ms
62,336 KB
testcase_13 AC 231 ms
63,104 KB
testcase_14 AC 49 ms
59,520 KB
testcase_15 AC 188 ms
59,904 KB
testcase_16 AC 79 ms
62,080 KB
testcase_17 AC 104 ms
60,928 KB
testcase_18 AC 107 ms
61,184 KB
testcase_19 AC 79 ms
61,952 KB
testcase_20 AC 82 ms
61,824 KB
testcase_21 AC 83 ms
62,080 KB
testcase_22 AC 103 ms
60,800 KB
testcase_23 AC 94 ms
61,184 KB
testcase_24 AC 103 ms
61,440 KB
testcase_25 AC 70 ms
61,696 KB
testcase_26 AC 76 ms
62,208 KB
testcase_27 AC 138 ms
61,056 KB
testcase_28 AC 129 ms
61,056 KB
testcase_29 AC 79 ms
61,952 KB
testcase_30 WA -
testcase_31 AC 113 ms
61,236 KB
testcase_32 AC 79 ms
61,824 KB
testcase_33 AC 89 ms
61,824 KB
testcase_34 AC 148 ms
61,184 KB
testcase_35 WA -
testcase_36 AC 146 ms
61,056 KB
testcase_37 AC 155 ms
60,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

r, b = map(int, input().split())
hi = 1817121
lw = 0
while hi - lw > 1:
    mid = (hi + lw) // 2
    rr, bb = r, b
    for i in range(mid, 0, -1):
        if rr < bb:
            rr, bb = bb, rr
        if i * i <= bb:
            bb -= i * i
        else:
            rr -= i * i
    if min(rr, bb) >= 0:
        lw = mid
    else:
        hi = mid
print(lw)
0