My issue
My code
// Step 1: Read and understand the problem statement and sample test cases
// Click on 'Next' once you are ready to proceed.
class avg
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int i=0;i<t;i++)
{
int A=sc.nextInt();
int C=sc.nextInt();
int B=A+C/2;
if(B==int)
System.out.println(B);
else
return -1;
}
}
}
Learning course: Java for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone