結果

問題 No.2198 Concon Substrings (COuNt-CONstruct Version)
ユーザー nono00nono00
提出日時 2023-01-20 23:25:51
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,178 bytes
コンパイル時間 4,585 ms
コンパイル使用メモリ 198,464 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-05 15:54:24
合計ジャッジ時間 12,560 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 AC 2 ms
4,376 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 2 ms
4,380 KB
testcase_29 AC 1 ms
4,380 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 2 ms
4,376 KB
testcase_32 AC 1 ms
4,380 KB
testcase_33 AC 1 ms
4,380 KB
testcase_34 AC 1 ms
4,380 KB
testcase_35 AC 2 ms
4,376 KB
testcase_36 AC 1 ms
4,380 KB
testcase_37 AC 2 ms
4,376 KB
testcase_38 AC 2 ms
4,376 KB
testcase_39 AC 1 ms
4,376 KB
testcase_40 WA -
testcase_41 AC 1 ms
4,380 KB
testcase_42 WA -
testcase_43 AC 2 ms
4,376 KB
testcase_44 AC 2 ms
4,380 KB
testcase_45 AC 2 ms
4,380 KB
testcase_46 WA -
testcase_47 WA -
testcase_48 AC 1 ms
4,376 KB
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 2 ms
4,376 KB
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 AC 2 ms
4,380 KB
testcase_56 AC 1 ms
4,376 KB
testcase_57 AC 2 ms
4,376 KB
testcase_58 WA -
testcase_59 AC 2 ms
4,376 KB
testcase_60 WA -
testcase_61 WA -
testcase_62 WA -
testcase_63 AC 1 ms
4,376 KB
testcase_64 WA -
testcase_65 AC 2 ms
4,376 KB
testcase_66 WA -
testcase_67 WA -
testcase_68 WA -
testcase_69 AC 1 ms
4,376 KB
testcase_70 AC 2 ms
4,376 KB
testcase_71 WA -
testcase_72 AC 2 ms
4,376 KB
testcase_73 WA -
testcase_74 AC 1 ms
4,376 KB
testcase_75 AC 2 ms
4,380 KB
testcase_76 AC 2 ms
4,380 KB
testcase_77 WA -
testcase_78 WA -
testcase_79 WA -
testcase_80 WA -
testcase_81 AC 1 ms
4,376 KB
testcase_82 WA -
testcase_83 AC 1 ms
4,380 KB
testcase_84 WA -
testcase_85 WA -
testcase_86 AC 2 ms
4,380 KB
testcase_87 WA -
testcase_88 WA -
testcase_89 AC 2 ms
4,380 KB
testcase_90 WA -
testcase_91 WA -
testcase_92 AC 2 ms
4,376 KB
testcase_93 WA -
testcase_94 WA -
testcase_95 AC 1 ms
4,380 KB
testcase_96 WA -
testcase_97 WA -
testcase_98 AC 2 ms
4,376 KB
testcase_99 AC 1 ms
4,380 KB
testcase_100 AC 1 ms
4,380 KB
testcase_101 AC 1 ms
4,376 KB
testcase_102 AC 2 ms
4,376 KB
testcase_103 WA -
testcase_104 AC 1 ms
4,376 KB
testcase_105 AC 2 ms
4,380 KB
testcase_106 WA -
testcase_107 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

void solve() {
    long long m;
    cin >> m;
    int x, y, z;
    z = m % 10000;
    m /= 10000;
    y = m % 10000;
    m /= 10000;
    x = m;

    string s;

    if (z == 0) {
        for (int i = 0; i < 10000; i++) {
            s.push_back('c');
        }
        s.push_back('o');
    } else {
        for (int i = 0; i < z; i++) {
            s.push_back('c');
        }
        s.push_back('o');
        s.push_back('n');

        for (int i = 0; i < (10000 - 2 * z); i++) {
            s.push_back('c');
        }
        s.push_back('o');
        for (int i = 0; i < z; i++) {
            s.push_back('c');
        }
    }

    if (y == 0) {
        for (int i = 0; i < 9999; i++) {
            s.push_back('o');
        }
    } else {
        for (int i = 0; i < (y - 1); i++) {
            s.push_back('o');
        }
        s.push_back('n');
        for (int i = 0; i < (10000 - y); i++) {
            s.push_back('o');
        }
    }

    for (int i = 0; i < x; i++) {
        s.push_back('n');
    }

    cout << s << '\n';
}

int main() {
    int q = 1;
    // cin >> q;
    while (q--) {
        solve();
    }
}
0