Submission #158115

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