結果

問題 No.2746 Bicolor Pyramid
ユーザー 👑 rin204rin204
提出日時 2024-04-20 14:28:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 204 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 82,768 KB
実行使用メモリ 54,044 KB
最終ジャッジ日時 2024-04-20 14:28:32
合計ジャッジ時間 2,657 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,776 KB
testcase_01 AC 37 ms
52,360 KB
testcase_02 AC 37 ms
52,764 KB
testcase_03 AC 37 ms
52,212 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 37 ms
52,484 KB
testcase_15 WA -
testcase_16 AC 37 ms
52,656 KB
testcase_17 WA -
testcase_18 AC 39 ms
52,644 KB
testcase_19 AC 37 ms
51,756 KB
testcase_20 AC 37 ms
52,808 KB
testcase_21 AC 37 ms
52,584 KB
testcase_22 AC 37 ms
52,980 KB
testcase_23 AC 37 ms
52,252 KB
testcase_24 AC 37 ms
52,916 KB
testcase_25 AC 36 ms
52,320 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 37 ms
52,392 KB
testcase_32 AC 39 ms
53,340 KB
testcase_33 WA -
testcase_34 AC 37 ms
52,224 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 37 ms
52,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

r, b = map(int, input().split())
t = r + b


l_ = 0
r_ = t + 1
while r_ - l_ > 1:
    m = (l_ + r_) // 2
    if m * (m + 1) * (2 * m + 1) // 6 <= t:
        l_ = m
    else:
        r_ = m

print(l_ - 1)
0