結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー chike_pluschike_plus
提出日時 2019-03-19 09:48:04
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 158 bytes
コンパイル時間 4,885 ms
コンパイル使用メモリ 160,652 KB
実行使用メモリ 24,188 KB
最終ジャッジ日時 2023-10-11 13:58:18
合計ジャッジ時間 7,362 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
21,976 KB
testcase_01 AC 57 ms
24,140 KB
testcase_02 AC 56 ms
22,036 KB
testcase_03 AC 56 ms
22,204 KB
testcase_04 AC 55 ms
22,068 KB
testcase_05 WA -
testcase_06 AC 56 ms
24,076 KB
testcase_07 AC 56 ms
24,044 KB
testcase_08 AC 55 ms
22,104 KB
testcase_09 AC 56 ms
22,124 KB
testcase_10 AC 56 ms
22,116 KB
testcase_11 AC 56 ms
22,080 KB
testcase_12 AC 56 ms
24,188 KB
testcase_13 AC 56 ms
20,028 KB
testcase_14 AC 55 ms
22,088 KB
testcase_15 AC 56 ms
24,124 KB
testcase_16 AC 55 ms
24,132 KB
testcase_17 AC 55 ms
22,104 KB
testcase_18 AC 56 ms
24,160 KB
testcase_19 AC 57 ms
22,192 KB
testcase_20 AC 56 ms
24,120 KB
testcase_21 AC 57 ms
24,052 KB
testcase_22 AC 56 ms
22,044 KB
testcase_23 AC 57 ms
24,144 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System

let max = Console.ReadLine() |> int

let rec twice n c =
  if (n*2) >= max 
    then c
    else twice (n*2) c + 1

twice 1 1
|> Console.WriteLine
0