結果

問題 No.313 π
ユーザー tunamagur0
提出日時 2019-08-17 15:34:37
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 8 ms / 5,000 ms
コード長 464 bytes
コンパイル時間 1,606 ms
コンパイル使用メモリ 169,552 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 19:51:30
合計ジャッジ時間 2,768 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(void) {
    int counts[] = {20104, 20063, 19892, 20011, 19874,
                    20199, 19898, 20163, 19956, 19841};
    vector<int> ans(2);
    string s;
    cin >> s;
    for (int i = 0; i < 10; i++) {
        int cnt = count(s.begin(), s.end(), '0' + i);
        if (cnt > counts[i]) ans[0] = i;
        if (cnt < counts[i]) ans[1] = i;
    }
    cout << ans[0] << " " << ans[1] << endl;
    return 0;
}
0