1161:0 start-up algorithm 68--delete character time limit:1 Sec Memory limit:64 MB 64bit IO Format:%lld
submitted:1412 accepted:479
[Submit] [Status] [Web Board] Description
Entering any string and a character from the keyboard requires that all of the characters be removed from the string.
Input
Input has multiple sets of test data.
For each set of two lines, the first line is a string (the string has at least one character, no more than 100), and the second line is a character
Output
One row per set of output, removing all strings that should be deleted
Sample Input
ABCDEEASD DFG FHDD
Sample Output
Abcdas FG FHD
Source
0 Starting point Learning algorithm
1#include <stdio.h>2#include <string.h>3 intMain () {4 Charch1[ -],ch2[ -];5 while(Gets (CH1)! =NULL) {6 CharC;7scanf"%c",&c); 8 GetChar ();9 intj=0;Ten for(intI=0; ch1[i]!=' /'; i++){ One if(ch1[i]!=c) { Ach2[j++]=Ch1[i]; - } - } the - puts (CH2); - } - return 0; +}
1161:0 start-up algorithm 68--delete character (not AC)