제출 #397511

#제출 시각아이디문제언어결과실행 시간메모리
397511IwanttobreakfreeAron (COCI17_aron)C++98
50 / 50
1 ms296 KiB
#include <iostream>
using namespace std;
int main(){
	int n,sum=0;
	char c,g='n';
	cin>>n;
	while(n--){
		cin>>c;
		if(c!=g)sum++;
		g=c;
	}
	cout<<sum+1;
}
#Verdict Execution timeMemoryGrader output
Fetching results...