View Code of Problem 3924

#include<stdio.h>
#include<string.h>
#include<stdlib.h>

int main() {
    char s[10000000];
    scanf("%s", s);
    int len = strlen(s);
    for (int i = 0; i < len; i++) {
        if (s[i] != s[i + 1])
            printf("%c", s[i]);
    }
    return 0;
}

Double click to view unformatted code.


Back to problem 3924