Help me in solving LBJ19 problem

My issue

not able to understand where the code is failing

My code

import java.util.*;

class income{
    
public static void main(String[]args){
    
    Scanner read= new Scanner(System.in);
     int t= read.nextInt();
     
     for(int i=0;i<t;i++){
         
         int n=read.nextInt();
         int x=read.nextInt();
         
         double a= Math.pow(2,x);
         double b= Math.pow(2,n);
         
         double saving= a/b;
     
         System.out.println(saving);
     }
}
}

Learning course: Solve Programming problems using Java
Problem Link: CodeChef: Practical coding for everyone

@yogeshkushwah7
U have to typecast the saving to int before printing it.
Like this

import java.util.*;

class income{
    
public static void main(String[]args){
    
    Scanner read= new Scanner(System.in);
     int t= read.nextInt();
     
     for(int i=0;i<t;i++){
         
         int n=read.nextInt();
         int x=read.nextInt();
         
         double a= Math.pow(2,x);
         double b= Math.pow(2,n);
         
         double saving= a/b;
     
         System.out.println((int)saving);
     }
}
}