結果

問題 No.501 穴と文字列
ユーザー tetsuzuki1115
提出日時 2018-04-15 17:26:09
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 499 bytes
コンパイル時間 714 ms
コンパイル使用メモリ 82,884 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-26 22:54:59
合計ジャッジ時間 1,647 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <limits.h>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <functional>
#include <stdio.h>
using namespace std;

long long MOD = 1000000007;

int main() {
    int N,D;
    cin >> N >> D;
    string S(N,'A');
    char c = N < D ? 'B' : 'C';

    for ( int i = 0; i < abs(N-D); i++ ) {
        S[N-1-i] = c;
    }

    cout << S << endl;
    return 0;
}
0