• + 0 comments

    Looks like default reading in python3 is incorrect. I've tried the following code with test case #6

    #!/bin/python3
    
    import sys
    
    if __name__ == "__main__":
        n, m, x, k = input().strip().split(' ')
        n, m, x, k = [int(n), int(m), int(x), int(k)]
        a = list(map(int, input().strip().split(' ')))
        b = list(map(int, input().strip().split(' ')))
        # Write Your Code Here
        print(n, m, x, k)
        print(len(a),len(b))
    

    the output on my computer is:

    1000 2000 1000 206630
    588 595
    

    instead of expected

    1000 2000 1000 206630
    1000 2000