結果
| 問題 |
No.1469 programing
|
| コンテスト | |
| ユーザー |
harurun
|
| 提出日時 | 2021-04-03 01:34:08 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 118 ms / 3,000 ms |
| コード長 | 298 bytes |
| コンパイル時間 | 677 ms |
| コンパイル使用メモリ | 67,456 KB |
| 最終ジャッジ日時 | 2025-01-20 10:18:10 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main(){
string S,ans="";
cin>>S;
if(S.size()<2){
cout<<S<<endl;
return 0;
}
ans=S.at(0);
for(int i=1;i<(int)S.size();i++){
if(S.at(i-1)!=S.at(i)){
ans+=S.at(i);
}
}
cout<<ans<<endl;
return 0;
}
harurun