結果

問題 No.1286 Stone Skipping
コンテスト
ユーザー Kude
提出日時 2020-11-13 23:18:56
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 241 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 267 ms
コンパイル使用メモリ 85,416 KB
実行使用メモリ 110,972 KB
最終ジャッジ日時 2026-04-03 11:18:05
合計ジャッジ時間 5,335 ms
ジャッジサーバーID
(参考情報)
judge4_1 / judge5_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other WA * 15 TLE * 1 -- * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# d + [d/2] = x
# [d/2] = x - d
# x-d <= d/2 < x-d+1
# 2/3 x <= d < 2/3 (x + 1)
# ceil(2/3 x) <= d < ceil(2/3 (x + 1))
d = int(input())
l, r = d, d + 1
ans = d
while l < r:
    ans = l
    l, r = (2 * l + 2) // 3, (2 * r + 2) // 3
print(ans)
0