結果

問題 No.2416 vs Slime
ユーザー bluemeganebluemegane
提出日時 2023-08-19 09:43:17
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 484 bytes
コンパイル時間 795 ms
コンパイル使用メモリ 65,328 KB
実行使用メモリ 23,220 KB
最終ジャッジ日時 2023-08-19 09:43:23
合計ジャッジ時間 4,595 ms
ジャッジサーバーID
(参考情報)
judge15 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
20,868 KB
testcase_01 AC 58 ms
20,824 KB
testcase_02 AC 58 ms
20,872 KB
testcase_03 AC 58 ms
20,828 KB
testcase_04 AC 58 ms
22,980 KB
testcase_05 AC 59 ms
22,904 KB
testcase_06 AC 57 ms
22,868 KB
testcase_07 AC 57 ms
20,932 KB
testcase_08 AC 58 ms
22,876 KB
testcase_09 AC 58 ms
21,024 KB
testcase_10 AC 58 ms
22,884 KB
testcase_11 AC 58 ms
20,840 KB
testcase_12 AC 58 ms
22,888 KB
testcase_13 AC 58 ms
21,020 KB
testcase_14 AC 58 ms
20,940 KB
testcase_15 AC 57 ms
18,880 KB
testcase_16 AC 59 ms
21,020 KB
testcase_17 AC 56 ms
20,872 KB
testcase_18 AC 57 ms
22,956 KB
testcase_19 AC 59 ms
21,268 KB
testcase_20 AC 57 ms
23,188 KB
testcase_21 AC 57 ms
22,820 KB
testcase_22 AC 57 ms
20,912 KB
testcase_23 AC 57 ms
21,308 KB
testcase_24 AC 57 ms
22,876 KB
testcase_25 AC 58 ms
23,208 KB
testcase_26 AC 57 ms
20,952 KB
testcase_27 AC 57 ms
20,976 KB
testcase_28 AC 57 ms
21,380 KB
testcase_29 AC 58 ms
21,168 KB
testcase_30 AC 58 ms
21,308 KB
testcase_31 AC 58 ms
21,388 KB
testcase_32 AC 57 ms
19,164 KB
testcase_33 AC 58 ms
21,176 KB
testcase_34 AC 59 ms
23,220 KB
testcase_35 AC 57 ms
23,192 KB
testcase_36 AC 57 ms
20,876 KB
testcase_37 AC 57 ms
19,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using static System.Math;
using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var h = long.Parse(line[0]);
        var a = long.Parse(line[1]);
        getAns(h, a);
    }
    static void getAns(long h, long a)
    {
        var c = 0;
        while (true)
        {
            h /= a;
            c++;
            if (h == 0) break;
        }
        Console.WriteLine((long)Pow(2, c) - 1);
    }
}
0