11830 - Contract Revision



import java.math.BigInteger;
import java.util.Scanner;

class Main11830 {

public static void main(String[] args) {
// TODO Auto-generated method stub
String ch,s,temp;

int i,j;
Scanner sc=new Scanner(System.in);
BigInteger a;
while(true)
{
temp=new String("");
ch=sc.next();
s=sc.next();
if(ch.charAt(0)=='0'&&s.charAt(0)=='0') break;
for(i=0;i<s.length();i++)
{
if(s.charAt(i)!=ch.charAt(0))
temp=temp+s.charAt(i);


}


if(temp.length()==0) temp="0";
a=new BigInteger(temp);

System.out.println(a);

}

}

}

SHARE

Amit Ghosh

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment