結果

問題 No.1643 Not Substring
ユーザー 杨娵隅杨娵隅
提出日時 2021-08-13 21:56:08
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 834 bytes
コンパイル時間 3,339 ms
コンパイル使用メモリ 165,160 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-07-27 06:34:16
合計ジャッジ時間 3,774 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 AC 2 ms
4,384 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,384 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 3 ms
4,384 KB
testcase_10 AC 2 ms
4,384 KB
testcase_11 AC 2 ms
4,384 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,384 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 2 ms
4,384 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 1 ms
4,384 KB
testcase_21 AC 1 ms
4,384 KB
testcase_22 AC 2 ms
4,384 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//code of JUYU ^ ^ never doubt youself !
#include <bits/stdc++.h>

#define For(i,a,b) for(int i=a;i<=b;i++) 
#define Rep(i,b,a) for(int i=a;i>=b;--i)
#define ms(a,b) memset(a,b,sizeof a)
#define fir first
#define sec second
#define eb emplace_back
#define pb push_back
#define mk make_pair

using namespace std;

typedef long long ll;
typedef pair<int,int> PII;

const int MOD = 1e9 + 7;
const int N = 1e5 + 10;

int ans;  //exactly you can get the answer

int main()
{
  string s; cin >> s; 
  int len = s.size();
  
  For(i,0,len-1) if (s[i] == 'a') ans ++;
  cout << 'a';
  For(i,1,ans) cout << 'a';
  cout << endl;
  
  return 0;
}
/* stuff you should look for
 * int overflow, array bounds
 * special cases (n=1?)
 * do smth instead of nothing and stay organized
 * WRITE STUFF DOWN
 * DON'T GET STUCK ON ONE APPROACH
 -- Benq
*/
0