結果
問題 |
No.1469 programing
|
ユーザー |
|
提出日時 | 2023-07-03 16:39:21 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 124 ms / 3,000 ms |
コード長 | 243 bytes |
コンパイル時間 | 734 ms |
コンパイル使用メモリ | 68,560 KB |
最終ジャッジ日時 | 2025-02-15 05:38:07 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 |
ソースコード
#include <iostream> #include <string> using namespace std; int main(){ string S,ans=""; cin>>S; 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; }