結果
| 問題 |
No.2041 E-mail Address
|
| コンテスト | |
| ユーザー |
bit_kyopro
|
| 提出日時 | 2022-08-19 21:36:26 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 453 bytes |
| コンパイル時間 | 555 ms |
| コンパイル使用メモリ | 68,496 KB |
| 最終ジャッジ日時 | 2025-01-31 00:44:38 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
using ll = long long;
int main() {
string t; cin >> t;
int n = t.size();
int l = -1, r = -1;
for (int i=0; i<n; i++) {
if (t[i] == '(') l = i;
if (t[i] == ')') r = i;
}
string ans;
for (int i=0; i<n; i++) {
if (i == l) ans.push_back('@');
if (l <= i && i <= r) continue;
ans.push_back(t[i]);
}
cout << ans << endl;
}
bit_kyopro