結果

問題 No.1469 programing
ユーザー harurun
提出日時 2021-04-03 01:15:20
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 274 bytes
コンパイル時間 551 ms
コンパイル使用メモリ 66,944 KB
最終ジャッジ日時 2025-01-20 10:17:19
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main(){
  string S;
  cin>>S;
  if(S.size()<2){
    cout<<S<<endl;
    return 0;
  }
  for(int i=S.size()-2;i>=0;i--){
    if(S.at(i)==S.at(i+1)){
      S.erase(i+1,1);
    }
  }
  cout<<S<<endl;
  return 0;
}
0