結果
問題 |
No.1643 Not Substring
|
ユーザー |
![]() |
提出日時 | 2021-08-13 21:23:51 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 401 bytes |
コンパイル時間 | 2,361 ms |
コンパイル使用メモリ | 192,588 KB |
最終ジャッジ日時 | 2025-01-23 18:03:16 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 26 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (int)(n); i++) using namespace std; using LL = long long; using P = pair<int,int>; using vv = vector<vector<int>>; const int INF = (int)1e9; const LL LINF = (LL)1e18; int main(){ string S; cin >> S; int num = 0; rep(i,S.size()) if(S[i] == 'a') num++; string ans; rep(i,num+1) ans.push_back('a'); cout << ans << endl; return 0; }