for i in range(input()):
b,c=[long(x) for x in raw_input().split()]
print b*c
That's at least how I would do it.
The long b,c= line can be replaced by the more understandable
rawb,rawc=raw_input().split()
b=long(rawb)
c=long(rawc)
First line "for i in range(input()):" iterates over [0,n) where n is the first line of input as an integer: input() parses input (so it will give integer for input like {12}, string for {"Hello"}, tuple for {(1,2,3)}, so on...). range() should be familiar to you.
Second line "b,c=[long(x) for x in raw_input().split()]" is a list comprehension. It is a relatively new feature that is quite powerful, allowing complex statements to be expressed with a simple syntax. Basically, it means that for each item in raw_input().split(), it will get the value as a long and add that to an array.
.split() will split an input line across a whitespace boundary.
You can also use "map(long,raw_input().split())" for a shorter line, but note that map, filter and reduce are in the process of being deprecated (I really wish that they would keep reduce though
)
Third line should be pretty obvious: print the product b*c.