結果

問題 No.642 Two Operations No.1
ユーザー tails1434tails1434
提出日時 2020-01-29 07:38:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 175 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 87,136 KB
実行使用メモリ 71,660 KB
最終ジャッジ日時 2023-10-13 22:48:48
合計ジャッジ時間 2,160 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,380 KB
testcase_01 AC 66 ms
71,384 KB
testcase_02 AC 66 ms
71,328 KB
testcase_03 AC 65 ms
71,376 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 65 ms
71,364 KB
testcase_14 AC 65 ms
71,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    X = 1
    cnt = 0
    while N > X:
        X *= 2
        cnt += 1

    cnt += X - N
    print(cnt)

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