結果
問題 | No.536 人工知能 |
ユーザー |
![]() |
提出日時 | 2017-10-07 11:11:14 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 315 bytes |
コンパイル時間 | 5,008 ms |
コンパイル使用メモリ | 210,696 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 04:23:52 |
合計ジャッジ時間 | 5,731 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include <iostream> #include <regex> #include <string> using namespace std; int main(void) { regex pattern(".*ai$"); string input; cin >> input; if(regex_match(input,pattern)){ cout << input.replace(input.length()-2, 2, "AI") << endl; } else{ cout << input << "-AI" << endl; } return 0; }