View Code of Problem 3924

#include<stdio.h>
#include<string.h>
char a[10000000];
int main()
{
	scanf("%s",a);
  int i;
        int len = strlen(a);
		while(i<len){
		while(a[i]==a[i+1])
		i++;
		printf("%c",a[i]);
		i++;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3924