import sequtils import strutils var T: int = stdin.readLine().parseInt() var cases: seq[seq[int]] for t in countup(1, T): var tmp = map(stdin.readLine().split(" "), proc(x: string): int = x.parseInt()) cases.add(tmp) for c in cases: echo(c[1] + (c[0] * c[1]))