結果

問題 No.642 Two Operations No.1
ユーザー brthyyjpbrthyyjp
提出日時 2020-06-10 02:16:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 127 bytes
コンパイル時間 596 ms
コンパイル使用メモリ 87,004 KB
実行使用メモリ 71,592 KB
最終ジャッジ日時 2023-09-02 09:44:33
合計ジャッジ時間 2,257 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,224 KB
testcase_01 AC 69 ms
71,592 KB
testcase_02 AC 69 ms
71,112 KB
testcase_03 AC 69 ms
71,188 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 69 ms
71,232 KB
testcase_14 AC 70 ms
71,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

if n == 1:
    print(0)
    exit()

x = 1
ans = 0
while x < n:
    x *= 2
    ans += 1
ans += x-n
print(ans)
0