結果

問題 No.2041 E-mail Address
ユーザー keisuke6
提出日時 2022-08-19 22:30:49
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 329 bytes
コンパイル時間 2,058 ms
コンパイル使用メモリ 193,328 KB
最終ジャッジ日時 2025-01-31 01:23:49
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  string S;
  cin>>S;
  int N = S.size();
  bool ok = true;
  for(int i=0;i<N;i++){
      if(S[i] == '(') ok = false;
      else if(S[i] == ')'){
          ok = true;
          cout<<'@';
      }
      else if(ok) cout<<S[i];
  }
  cout<<endl;
}
0