結果
問題 |
No.378 名声値を稼ごう
|
ユーザー |
|
提出日時 | 2016-08-06 01:08:34 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 275 bytes |
コンパイル時間 | 180 ms |
コンパイル使用メモリ | 82,252 KB |
実行使用メモリ | 53,288 KB |
最終ジャッジ日時 | 2024-06-29 14:13:44 |
合計ジャッジ時間 | 829 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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()