結果

問題 No.1469 programing
ユーザー MAHAYANAMAHAYANA
提出日時 2023-10-23 20:35:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 140 ms / 3,000 ms
コード長 343 bytes
コンパイル時間 1,470 ms
コンパイル使用メモリ 166,536 KB
実行使用メモリ 12,728 KB
最終ジャッジ日時 2023-10-23 20:35:31
合計ジャッジ時間 3,833 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 5 ms
4,348 KB
testcase_09 AC 7 ms
4,348 KB
testcase_10 AC 6 ms
4,348 KB
testcase_11 AC 10 ms
4,348 KB
testcase_12 AC 7 ms
4,348 KB
testcase_13 AC 1 ms
4,348 KB
testcase_14 AC 12 ms
4,348 KB
testcase_15 AC 10 ms
4,348 KB
testcase_16 AC 16 ms
4,356 KB
testcase_17 AC 140 ms
12,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,m,n) for(int i=m; i<n; ++i)
#define repl(i,m,n) for(ll i=m; i<n; ++i)

int main(){
    string S;
    cin >> S;

    int n = S.size();
    rep(i, 0, n){
        if(i < n-1 && S[i] == S[i+1]) continue;
        cout << S[i];
    }
    cout << endl;

    return 0;
}
0