結果
| 問題 | No.378 名声値を稼ごう |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-06 01:08:34 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 2,000 ms |
| コード長 | 275 bytes |
| 記録 | |
| コンパイル時間 | 1,419 ms |
| コンパイル使用メモリ | 85,320 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2026-03-19 03:28:09 |
| 合計ジャッジ時間 | 2,045 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 |
ソースコード
def solve():
n = int(input())
arr, nc = [], n
while nc > 0:
arr.append(nc)
nc //= 2
arr.append(0)
standardscore = sum(arr)
print(arr[0] + arr[1] * 2 + (arr[0] % 2 == 1 if 1 else 0) - standardscore)
if __name__=="__main__":
solve()