結果

問題 No.381 名声値を稼ごう Extra
ユーザー りあんりあん
提出日時 2016-06-18 00:19:33
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 272 bytes
コンパイル時間 341 ms
コンパイル使用メモリ 82,620 KB
実行使用メモリ 70,764 KB
最終ジャッジ日時 2024-04-18 02:12:50
合計ジャッジ時間 786 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,224 KB
testcase_01 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = 0
while n > 0:
    count = (n & 0x5555) + ((n >> 1) & 0x5555)
    count = (count & 0x3333) + ((count >> 2) & 0x3333)
    count = (count & 0x0f0f) + ((count >> 4) & 0x0f0f)
    ans += (count & 0x00ff) + ((count >> 8) & 0x00ff)
    n >>= 16
print(ans)
0