View Code of Problem 3924

#include <iostream>
using namespace std;

int main(){
	string s;
	cin>>s;
	int i;
	for(i=0;i<s.length()-1;i++){
		if(s[i]!=s[i+1]){
			printf("%c",s[i]);
		} 
	}
	printf("%c\n",s[i]);
}

Double click to view unformatted code.


Back to problem 3924