結果

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

ソースコード

diff #

#include<iostream>

typedef long long ll;

int main() {
    ll x;
    std::cin >> x;

    ll a = 0, b = 0;
    for (ll n = 0; n < (1LL << 31); n++) {
        if (__builtin_popcountll(n) == x) {
            a++;
            b += n;
        }
    }

    std::cout << a << " " << b << std::endl;
}
0