I want to read the following input in php which is entered in termial
3
5
1 4 0 2 5
2 0 5 1 4
4
1 1 7 2
1 13 2 1
3
3 1 7
2 5 4
Where:
- The first line of input consists of an integer
T
which is the number of test cases. - The first line of each test case contains an integer n which indicates the size of both arrays.
- The second and third line of each test case contains n space separated integers which are the elements of the first and second arrays respectively.
I am new to PHP, can anybody explain me the code logic of reading the input?
I don't want to store the input in a file and read it from there.
Any help would be appreciable, Thank you.