結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー go_boardwalkgo_boardwalk
提出日時 2017-04-01 00:50:07
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 18 ms / 5,000 ms
コード長 138 bytes
コンパイル時間 26 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 12,000 KB
最終ジャッジ日時 2023-09-21 21:12:06
合計ジャッジ時間 1,423 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
11,764 KB
testcase_01 AC 18 ms
12,000 KB
testcase_02 AC 17 ms
11,980 KB
testcase_03 AC 17 ms
11,904 KB
testcase_04 AC 18 ms
11,900 KB
testcase_05 AC 16 ms
11,988 KB
testcase_06 AC 16 ms
11,932 KB
testcase_07 AC 16 ms
11,944 KB
testcase_08 AC 16 ms
11,804 KB
testcase_09 AC 16 ms
11,804 KB
testcase_10 AC 17 ms
11,756 KB
testcase_11 AC 15 ms
11,760 KB
testcase_12 AC 15 ms
11,772 KB
testcase_13 AC 16 ms
11,812 KB
testcase_14 AC 15 ms
11,892 KB
testcase_15 AC 16 ms
11,812 KB
testcase_16 AC 17 ms
11,832 KB
testcase_17 AC 17 ms
11,940 KB
testcase_18 AC 16 ms
11,936 KB
testcase_19 AC 17 ms
11,836 KB
testcase_20 AC 17 ms
11,792 KB
testcase_21 AC 17 ms
11,960 KB
testcase_22 AC 16 ms
11,856 KB
testcase_23 AC 16 ms
11,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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