1.
package
contestVolumes.volume118;
import java.util.Scanner;
/**
* FWP, Ausgewählte Probleme aus dem ACM Programming Contest,
SS10
* Problem: 11830 - Contract Revision
* Link:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=226&page=show_problem&problem=2930
*
* @author Siegfried Ippisch
* @version 1.0
*
* Method : String
* Status : Accepted
* Runtime: 0.348
*/
public class ContractRevision {
public static void main(String[] args){
Scanner in = new
Scanner(System.in);
while(true){
String d =
in.next();
String n =
in.next();
if(d.equals("0") && n.equals("0"))
break;
n =
n.replace(d, "");
int i = 0;
while(i <
n.length() && n.charAt(i) == '0')
i++;
n =
n.substring(i);
System.out.println(n.length() == 0 ? "0": n);
}
in.close();
}
}