結果

問題 No.47 ポケットを叩くとビスケットが2倍
コンテスト
ユーザー go_boardwalk
提出日時 2017-04-01 00:50:07
言語 Scheme
(Gauche-0.9.15)
コンパイル:
true
実行:
gosh _filename_
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 138 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 49 ms
コンパイル使用メモリ 6,400 KB
実行使用メモリ 16,512 KB
最終ジャッジ日時 2026-03-29 05:29:50
合計ジャッジ時間 1,190 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

(define n (read))
(define x (floor->exact (log n 2)))
(define y (- n (expt 2 x)))

(print (if (zero? y)
           x
           (+ x 1)))
0