제출 #293387

#제출 시각아이디문제언어결과실행 시간메모리
2933877_7_7Aron (COCI17_aron)C++17
50 / 50
1 ms384 KiB
#include <bits/stdc++.h>

using namespace std;


int main()
{
    ios_base::sync_with_stdio(false);

    int n;
    cin >> n;
    int cnt = 1;
    char last = '#';
    for(int i = 1; i <= n; i ++){
        char c;
        cin >> c;
        if(last != c){
            cnt ++;
            last = c;
        }
    }
    cout << cnt << "\n";
}

#Verdict Execution timeMemoryGrader output
Fetching results...