結果

問題 No.2041 E-mail Address
ユーザー kuronikuroni
提出日時 2022-08-19 21:22:05
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 382 bytes
コンパイル時間 1,684 ms
コンパイル使用メモリ 166,412 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-08 07:13:23
合計ジャッジ時間 2,628 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    string s; cin >> s;
    bool ok = false;
    for (char c : s) {
        if (c == '(') {
            cout << "@";
            ok = true;
        } else if (c == ')') {
            ok = false;
        } else if (!ok) {
            cout << c;
        }
    }
}
0