Submission #83754

#TimeUsernameProblemLanguageResultExecution timeMemory
83754MatesV13Aron (COCI17_aron)C++14
50 / 50
2 ms560 KiB
#include<bits/stdc++.h> using namespace std; int n, x=1; char str[27]; int main (){ ios::sync_with_stdio(0); cin.tie(0); cin >> n; for (int i=0;i<n;i++) cin >> str[i]; for (int i=1 ; i < n ; i++){ if (str[i] == str[i-1]) continue; else x++; } cout << x+1; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...