結果
問題 |
No.1286 Stone Skipping
|
ユーザー |
![]() |
提出日時 | 2023-04-04 12:32:16 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 420 bytes |
コンパイル時間 | 358 ms |
コンパイル使用メモリ | 82,388 KB |
実行使用メモリ | 60,204 KB |
最終ジャッジ日時 | 2024-10-01 05:42:52 |
合計ジャッジ時間 | 2,995 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 WA * 2 |
ソースコード
def check(m): now = m x = 0 while now: x += now now //= 2 return x D = int(input()) yes = 10 ** 18 no = 0 while yes - no != 1: mid = (yes + no)//2 if check(mid) >= D: yes = mid else: no = mid for i in range(yes, yes + 10 ** 6): now = i x = 0 while now: x += now now //= 2 if x == D: print(i) exit()