結果
問題 |
No.1643 Not Substring
|
ユーザー |
|
提出日時 | 2021-08-14 09:11:52 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 550 bytes |
コンパイル時間 | 2,689 ms |
コンパイル使用メモリ | 193,556 KB |
最終ジャッジ日時 | 2025-01-23 21:45:05 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 26 |
ソースコード
/** * author: ytsmash * created: 14.08.2021 08:58:52 **/ #include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define all(x) x.begin(), x.end() const long double EPS = 1e-10; const long long INF = 1e18; const long double PI = acos(-1.0L); using P = pair<int, int>; int main() { string S; cin >> S; int cnt = 0; rep(i, S.size()) { if (S[i] == 'a') { cnt++; } } rep(i, cnt+1) { cout << 'a'; } cout << "\n"; }