結果

問題 No.2416 vs Slime
ユーザー bluemeganebluemegane
提出日時 2023-08-19 09:43:17
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 484 bytes
コンパイル時間 740 ms
コンパイル使用メモリ 109,940 KB
実行使用メモリ 26,388 KB
最終ジャッジ日時 2024-05-06 16:56:14
合計ジャッジ時間 2,617 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
24,416 KB
testcase_01 AC 23 ms
26,256 KB
testcase_02 AC 24 ms
24,204 KB
testcase_03 AC 23 ms
24,284 KB
testcase_04 AC 24 ms
26,324 KB
testcase_05 AC 25 ms
26,064 KB
testcase_06 AC 23 ms
24,080 KB
testcase_07 AC 22 ms
22,448 KB
testcase_08 AC 24 ms
24,236 KB
testcase_09 AC 24 ms
24,288 KB
testcase_10 AC 23 ms
24,404 KB
testcase_11 AC 23 ms
26,108 KB
testcase_12 AC 24 ms
24,208 KB
testcase_13 AC 23 ms
24,588 KB
testcase_14 AC 23 ms
24,156 KB
testcase_15 AC 23 ms
24,476 KB
testcase_16 AC 22 ms
24,284 KB
testcase_17 AC 23 ms
24,216 KB
testcase_18 AC 22 ms
24,292 KB
testcase_19 AC 22 ms
24,628 KB
testcase_20 AC 23 ms
24,152 KB
testcase_21 AC 24 ms
24,152 KB
testcase_22 AC 23 ms
24,112 KB
testcase_23 AC 23 ms
26,388 KB
testcase_24 AC 22 ms
24,244 KB
testcase_25 AC 22 ms
24,156 KB
testcase_26 AC 21 ms
26,096 KB
testcase_27 AC 21 ms
22,196 KB
testcase_28 AC 22 ms
26,320 KB
testcase_29 AC 22 ms
24,152 KB
testcase_30 AC 22 ms
24,240 KB
testcase_31 AC 22 ms
24,364 KB
testcase_32 AC 22 ms
26,372 KB
testcase_33 AC 24 ms
24,284 KB
testcase_34 AC 24 ms
26,064 KB
testcase_35 AC 24 ms
26,260 KB
testcase_36 AC 24 ms
25,996 KB
testcase_37 AC 23 ms
26,328 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

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