Submission #500354

#TimeUsernameProblemLanguageResultExecution timeMemory
500354kappaAron (COCI17_aron)C++14
50 / 50
1 ms296 KiB
#include <bits/stdc++.h> using namespace std; int n, ans; char d[30]; int main(){ cin >> n; for (int i = 0; i < n; i++) { cin >> d[i]; if(d[i] != d[i - 1]){ ans++; } } cout << ans + 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...