結果
問題 | No.501 穴と文字列 |
ユーザー |
![]() |
提出日時 | 2025-06-28 14:13:03 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 428 bytes |
コンパイル時間 | 3,100 ms |
コンパイル使用メモリ | 274,152 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-06-28 14:13:07 |
合計ジャッジ時間 | 3,809 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#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'; n--; } return 0; }