結果

問題 No.2416 vs Slime
ユーザー iseeisee
提出日時 2023-08-12 14:27:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 348 ms
コンパイル使用メモリ 82,184 KB
実行使用メモリ 54,108 KB
最終ジャッジ日時 2024-04-30 06:08:19
合計ジャッジ時間 2,625 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,424 KB
testcase_01 AC 32 ms
51,756 KB
testcase_02 AC 31 ms
53,000 KB
testcase_03 AC 31 ms
51,748 KB
testcase_04 AC 32 ms
52,680 KB
testcase_05 AC 31 ms
52,620 KB
testcase_06 AC 32 ms
52,688 KB
testcase_07 AC 35 ms
51,756 KB
testcase_08 AC 33 ms
52,556 KB
testcase_09 AC 32 ms
52,824 KB
testcase_10 AC 32 ms
53,164 KB
testcase_11 AC 32 ms
53,212 KB
testcase_12 AC 32 ms
51,752 KB
testcase_13 AC 32 ms
53,312 KB
testcase_14 AC 32 ms
51,752 KB
testcase_15 AC 33 ms
52,832 KB
testcase_16 AC 32 ms
53,220 KB
testcase_17 AC 32 ms
52,960 KB
testcase_18 AC 31 ms
53,972 KB
testcase_19 AC 31 ms
52,156 KB
testcase_20 AC 33 ms
52,604 KB
testcase_21 AC 31 ms
53,112 KB
testcase_22 AC 31 ms
52,964 KB
testcase_23 AC 34 ms
53,728 KB
testcase_24 AC 34 ms
53,572 KB
testcase_25 AC 31 ms
53,320 KB
testcase_26 AC 32 ms
52,400 KB
testcase_27 AC 32 ms
52,068 KB
testcase_28 AC 32 ms
52,336 KB
testcase_29 AC 31 ms
52,252 KB
testcase_30 AC 35 ms
52,800 KB
testcase_31 AC 31 ms
54,108 KB
testcase_32 AC 34 ms
53,156 KB
testcase_33 AC 32 ms
51,992 KB
testcase_34 AC 33 ms
52,184 KB
testcase_35 AC 32 ms
53,488 KB
testcase_36 AC 33 ms
52,460 KB
testcase_37 AC 31 ms
53,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    # 入力
    H, A = map(int, input().split())
    # 計算・出力
    ans = 0
    while H:
        H //= A
        ans += 1
    print(2**ans-1)

if __name__ == "__main__":
    main()
0