Submission #156389

#TimeUsernameProblemLanguageResultExecution timeMemory
156389DodaAron (COCI17_aron)C++14
50 / 50
2 ms380 KiB
#include <iostream> using namespace std; int main () { int n ; int b = 0; char a[50]; cin >> n ; for (int i = 0; i<n ;i++) { cin >> a [i]; } for (int i=0; i<n ; i++){ if (a [i] != a[i+1]) { b++; } } cout << b+1 ; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...