View Code of Problem 3924

#include<bits/stdc++.h>
using namespace std;

int main()
{
	string s;
	cin >> s;
	int len = s.size();
	for(int i = 0; i < len; i++)
	{
		if(s[i] != s[i + 1])
			cout << s[i];
		else
			continue;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3924