結果
| 問題 |
No.47 ポケットを叩くとビスケットが2倍
|
| ユーザー |
takopom55
|
| 提出日時 | 2016-11-30 00:22:28 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 5,000 ms |
| コード長 | 279 bytes |
| コンパイル時間 | 283 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-27 13:51:34 |
| 合計ジャッジ時間 | 1,613 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
def main():
N = int(input())
hit = 0
biscuit = 1
while biscuit * 2 <= N:
biscuit = biscuit * 2
hit += 1
while (N - biscuit) > 0:
biscuit += (N - biscuit) * 2
hit += 1
print(hit)
if __name__ == '__main__':
main()
takopom55