結果
| 問題 |
No.642 Two Operations No.1
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-13 10:27:12 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 400 bytes |
| コンパイル時間 | 194 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-24 23:48:20 |
| 合計ジャッジ時間 | 1,432 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 9 |
ソースコード
import sys, math
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
ntp = lambda: tuple(map(int, stdin.readline().split()))
mod = 10 * 9 + 7
inf = 2 << 60
n = ni()
x = 1
y = math.log2(n)
if y - int(y) == 0:
print(int(y))
else:
y = int(y) + 1
print(y + (x * 2 ** y - n))