結果

問題 No.420 mod2漸化式
ユーザー ngtkana
提出日時 2020-03-19 13:42:15
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 391 bytes
コンパイル時間 2,971 ms
コンパイル使用メモリ 192,564 KB
最終ジャッジ日時 2025-01-09 07:53:27
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample TLE * 1
other TLE * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using lint=long long;
int main(){
    std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false);
    std::cout.setf(std::ios_base::fixed);std::cout.precision(15);
    lint X;std::cin>>X;
    lint a=0,b=0;
    for(lint i=0;i<=2147483647;i++){
        if(__builtin_popcount(i)==X){
            a++;
            b+=i;
        }
    }
    std::cout<<a<<" "<<b<<'\n';
}
0