結果
| 問題 | No.680 作れる数 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-23 09:25:31 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 95 ms / 2,000 ms |
| + 393µs | |
| コード長 | 307 bytes |
| 記録 | |
| コンパイル時間 | 512 ms |
| コンパイル使用メモリ | 21,280 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-08-24 05:19:06 |
| 合計ジャッジ時間 | 4,111 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
def f(N):
if N == 1: return 1
return N + f(N // 2)
def possible(flag):
if flag: print('YES');exit()
N = int(input())
possible(N == 0)
# bisect
l, r = 0, 10 ** 9
while r - l > 1:
m = (r + l) // 2
possible(f(m) == N)
if f(m) > N:
r = m
else:
l = m
print('NO')