結果
| 問題 |
No.3055 Simple Chicken Game
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 19:57:41 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 291 bytes |
| コンパイル時間 | 232 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 65,280 KB |
| 最終ジャッジ日時 | 2025-06-12 20:00:20 |
| 合計ジャッジ時間 | 3,242 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 30 |
ソースコード
n = int(input())
count = 0
k = 0
while (1 << k) <= n:
two_k = 1 << k
two_k_plus_1 = two_k << 1
blocks = (n + 1) // two_k_plus_1
count += blocks * two_k
remainder = (n + 1) % two_k_plus_1
if remainder > two_k:
count += remainder - two_k
k += 1
print(count)
gew1fw