結果

問題 No.2746 Bicolor Pyramid
ユーザー rin204
提出日時 2024-04-20 14:28:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 204 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 82,260 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-10-12 10:01:46
合計ジャッジ時間 2,740 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 17 WA * 19
権限があれば一括ダウンロードができます

ソースコード

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