結果
| 問題 | No.1286 Stone Skipping |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2022-07-05 21:30:41 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 28 ms / 2,000 ms |
| + 850µs | |
| コード長 | 297 bytes |
| 記録 | |
| コンパイル時間 | 212 ms |
| コンパイル使用メモリ | 81,916 KB |
| 実行使用メモリ | 63,472 KB |
| 最終ジャッジ日時 | 2026-10-04 11:27:50 |
| 合計ジャッジ時間 | 2,863 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
d = int(input())
ans = 1 << 70
for c in range(70):
x = (1 << (c + 1)) - 1
y = d
while x < y:
x <<= 1
l = 0
while x > 0:
if y >= x:
y -= x
l += 1 << (x.bit_length() - 1)
x >>= 1
if y == 0:
ans = min(ans, l)
print(ans)