python3 runtime error (NZEC)

import sys

test = int (input())

for i in range(test):

a = int (input())
b = int (input())
print(max(a,b),a+b)

why this code results in runtime error for the problem: REMISS Problem - CodeChef

use

   a, b = map(int, input().split())

instead of the corresponding two lines

@hsr0

you gave excellent way to take two input one time.

This also can work:

a,b=input().split()

a,b=int(a), int(b)

This can we useful when you need to scan two input of different data type.

like char,int

a,b=intput().split()

a,b=char(a),int(b)

Happy Coding

somebody please upvote me , i have questions to ask
thank you

2 Likes

@hsr0
you gave excellent way to take two input one time.

This also can work:

a,b=input().split()

a,b=int(a), int(b)