10406 - problem4   

Description

Consider a string that contains alphabetical characters such as abcd… or ABCD... without whitespaces. The length of the string is less than 80.

The task: Given substring, delete it from the input string. Assume that the occurrence of the substring is exact one.

For example, if the input string is "CatDoGDogCatcatDOG", and the substring to be deleted is "Dog", then the output should be " CatDoGCatcatDOG ".

#include 
#include 
#define MAX_LEN 80

char input[MAX_LEN];
char subs[MAX_LEN];
char output[MAX_LEN];

int main(void)
{
    int i, j, k, match;
    scanf("%s", input);
    scanf("%s", subs);
    /* your code */
    printf("%s\n", output);
    return 0;
}

Input

The first line is the input string, and the second line is the substring to be deleted.

Output

A new string after deletion.

Sample Input  Download

Sample Output  Download

Tags




Discuss