My code works fine on my laptop but not on the website

code-https://ide.codingblocks.com/s/308236

@amanb25,
You have to take input of test case in first line.

for some reason it still doesn’t work when i submit it even though it gives the right answer

@amanb25,
Updated code link…?

@amanb25,
You are not taking input correctly, where have you taken number of test cases as input…?
Please read the Input format carefully!!!