結果

問題 No.501 穴と文字列
ユーザー vjudge1
提出日時 2025-06-28 14:11:17
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 417 bytes
コンパイル時間 2,829 ms
コンパイル使用メモリ 275,304 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-06-28 14:11:23
合計ジャッジ時間 4,773 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 7 RE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
int n,d;
signed main() 
{
    //freopen(".in","r",stdin);
    //freopen(".out","w",stdout);
    cin>>n>>d;
    while(n--)
    {
        if(d!=0&&d/n<2)
        {
            cout<<'A';
            d--;
        }
        else if(d!=0&&d/n==2)
        {
            cout<<'B';
            d-=2;
        }
        else cout<<'C';
    }
    return 0;
}
0