tc = int(input()) while tc: tc -= 1 n, a, d = [int(x) for x in raw_input().split()] total = 0 while n: n -= 1 total += a a += d print total # end of source code
No comments:
Post a Comment