結果

問題 No.642 Two Operations No.1
コンテスト
ユーザー Ribura
提出日時 2020-05-19 23:49:37
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 318 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 55 ms
コンパイル使用メモリ 15,232 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2026-09-08 08:45:01
合計ジャッジ時間 1,579 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline())
x = 1
if x == n:
    print(0)
    exit()
for i in range(n):
    if x * 2 < n:
        x *= 2
    else:
        print(i + 1 + x * 2 - n)
        break
0