結果

問題 No.2041 E-mail Address
ユーザー elphe
提出日時 2025-03-31 19:54:40
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 538 bytes
コンパイル時間 842 ms
コンパイル使用メモリ 78,716 KB
実行使用メモリ 7,328 KB
最終ジャッジ日時 2025-03-31 19:54:42
合計ジャッジ時間 2,034 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdint>

using namespace std;

static inline void output(const string& T)
{
	bool parenthesis_mode = false;
	for (uint32_t i = 0; i != T.size(); ++i)
		switch (T[i])
		{
		case '(':
			parenthesis_mode = true;
			break;

		case ')':
			parenthesis_mode = false;
			cout << '@';
			break;

		default:
			if (!parenthesis_mode)
				cout << T[i];
			break;
		}

	cout << '\n';
}

int main()
{
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	string T;
	T.reserve(100000);
	cin >> T;

	output(T);
	return 0;
}
0