結果
問題 |
No.1643 Not Substring
|
ユーザー |
|
提出日時 | 2021-08-16 17:12:05 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 335 bytes |
コンパイル時間 | 485 ms |
コンパイル使用メモリ | 68,436 KB |
最終ジャッジ日時 | 2025-01-23 22:33:59 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 7 WA * 19 |
ソースコード
#include <iostream> #include <string> using namespace std; int main(){ string s, ans; cin >> s; bool na = false; for (int i = 0; i < s.size(); i++){ if(na == false) ans.push_back('a'); if (s[i] != 'a') na = true; } if (na == false) ans.push_back('a'); cout << ans << endl; }