結果

問題 No.378 名声値を稼ごう
ユーザー HachimoriHachimori
提出日時 2016-06-17 22:24:59
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 244 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 6,508 KB
実行使用メモリ 6,212 KB
最終ジャッジ日時 2023-09-12 00:47:08
合計ジャッジ時間 761 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,156 KB
testcase_01 AC 12 ms
6,040 KB
testcase_02 AC 11 ms
6,068 KB
testcase_03 AC 12 ms
6,156 KB
testcase_04 AC 12 ms
5,996 KB
testcase_05 AC 12 ms
6,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
#coding:utf8

def read():
    return input()


def work(N):
    a = 0
    
    curN = N
    while curN:
        a += curN
        curN /= 2
    
    b = N * 2

    print b - a


if __name__ == "__main__":
    work(read())
0