結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー moriguchi1983moriguchi1983
提出日時 2018-10-03 22:22:48
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 25 ms / 5,000 ms
コード長 575 bytes
コンパイル時間 742 ms
コンパイル使用メモリ 109,888 KB
実行使用メモリ 25,996 KB
最終ジャッジ日時 2024-04-20 14:53:33
合計ジャッジ時間 2,061 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
23,904 KB
testcase_01 AC 24 ms
23,904 KB
testcase_02 AC 23 ms
23,988 KB
testcase_03 AC 23 ms
25,812 KB
testcase_04 AC 23 ms
23,980 KB
testcase_05 AC 25 ms
25,864 KB
testcase_06 AC 24 ms
24,160 KB
testcase_07 AC 24 ms
25,692 KB
testcase_08 AC 23 ms
23,696 KB
testcase_09 AC 23 ms
25,812 KB
testcase_10 AC 24 ms
24,028 KB
testcase_11 AC 24 ms
24,028 KB
testcase_12 AC 24 ms
25,820 KB
testcase_13 AC 24 ms
24,032 KB
testcase_14 AC 24 ms
25,996 KB
testcase_15 AC 24 ms
25,872 KB
testcase_16 AC 23 ms
24,160 KB
testcase_17 AC 23 ms
23,768 KB
testcase_18 AC 25 ms
24,156 KB
testcase_19 AC 24 ms
25,944 KB
testcase_20 AC 23 ms
23,732 KB
testcase_21 AC 24 ms
24,112 KB
testcase_22 AC 23 ms
23,644 KB
testcase_23 AC 23 ms
23,896 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace Probrem043
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ');
            var eat = int.Parse(input[0]); //10
            int bis = 1;
            int ans = 0;

            while(true){
                if (eat <= bis) break;
                bis = bis * 2;
                ans += 1;
            }
                //var b = decimal.Parse(input[1]);
                //var ans = Math.Ceiling(b / a);
                
                Console.WriteLine(ans);
        }
    }
}
0