結果
| 問題 | 
                            No.1286 Stone Skipping
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Kude
                         | 
                    
| 提出日時 | 2020-11-13 23:18:56 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 241 bytes | 
| コンパイル時間 | 182 ms | 
| コンパイル使用メモリ | 81,792 KB | 
| 実行使用メモリ | 62,336 KB | 
| 最終ジャッジ日時 | 2024-07-22 22:15:53 | 
| 合計ジャッジ時間 | 4,690 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 2 | 
| other | WA * 15 TLE * 1 -- * 10 | 
ソースコード
# 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)
            
            
            
        
            
Kude