結果

問題 No.381 名声値を稼ごう Extra
ユーザー itezpaceitezpace
提出日時 2016-06-18 07:44:22
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 356 bytes
コンパイル時間 1,240 ms
コンパイル使用メモリ 162,060 KB
実行使用メモリ 6,816 KB
最終ジャッジ日時 2024-04-18 02:45:52
合計ジャッジ時間 1,603 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int mod=1004535809;

int main(){
  ull n;
  cin>>n;
  string s;
  while(n>0){
    int a;
    a=n%2;
    string b;
    b=to_string(a);
    s+=b;
    n/=2;
  }
  reverse(s.begin(),s.end());

  bitset<128> bs(s);
  cout<<bs.count()<<endl;
  return 0;
}
0