結果

問題 No.420 mod2漸化式
ユーザー rabimea
提出日時 2025-09-29 14:11:08
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 534 bytes
コンパイル時間 2,905 ms
コンパイル使用メモリ 275,620 KB
実行使用メモリ 10,912 KB
最終ジャッジ日時 2025-09-29 14:11:16
合計ジャッジ時間 6,950 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 15 WA * 19 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

// #pragma GCC optimize ("Ofast")
// #pragma GCC optimize ("unroll-loops")
// #pragma GCC target ("avx,avx2,fma")
#include <bits/stdc++.h>

using std::cin, std::cout, std::cerr;
using ll = long long;

ll Binom(int n, int m) {
    ll r = 1;
    for(int i = n; i > n - m; i --)
        r *= i;
    for(int i = 1; i <= m; i ++)
        r /= i;
    return r;
}

int main() {
    std::ios::sync_with_stdio(false);
    int x; cin >> x;
    ll b = Binom(31, x);
    ll s = b * ((1LL << 31) - 1) / 31 * x;
    cout << b << ' ' << s << '\n';
}
0