Help me in solving LB01A problem

My issue

I wanna check if B is a floating value or not. If B is an integer it will return B or else -1

My code

# Step 1: Read and understand the problem statement and sample test cases

# Click on 'Next' once you are ready to proceed.
for i in range(t):
    A, C=map(int, input().split)
    if B==int:

Learning course: Python for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone

since u r taking average then the condition for having integer is if both A and C is even or odd else it would be -1

1 Like