Ultra Fast Mathematicians problem

https://ide.geeksforgeeks.org/noInTvRuff-----my output is correct for sample input but test cases are not passing, can u point out the errors in the code

int x = cin.nextInt(), y = cin.nextInt();
x and y take input as String
because The length of each number less than or Equal to 100.

https://ide.geeksforgeeks.org/nyMUWNxJav---- i have made the changes u said but still test cases are not passing

@AbhishekAhlawat1102
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner cin = new Scanner(System.in);
int n = cin.nextInt();
while(n>0){
StringBuilder str = new StringBuilder();
String x = cin.next(), y = cin.next();
int num = 0;
// while(x>0&&y>0){

		  while(num<x.length()){
		  char d1 = x.charAt(num);
		  char d2 = y.charAt(num);
		   if(d1 == d2){
			   str.append("0");
		   }else{
			   str.append("1");
		   }
		   num++;
	   }
	 //  str.reverse();
	   System.out.println(str.toString());
	   n--;
   }
}

}