結果

問題 No.1643 Not Substring
ユーザー Makuro_rinn
提出日時 2021-08-14 13:34:38
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 1,306 ms
コンパイル使用メモリ 168,028 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-05 06:26:24
合計ジャッジ時間 2,041 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
	string s;
	cin >> s;
	
	int n=s.size();
	
	int counter=1;
	
	rep(i,n){
		if (s[i]=='a') counter++;
	}
	
	string ans ="";
	
	rep(i,counter) ans+="a";
	
	cout << ans << endl;
}
0