#Z12507. 等差数列末项计算
等差数列末项计算
Description
Given the first two terms (a_1) and (a_2) of an arithmetic sequence, find the value of the (n)-th term.
Input Format
A single line containing three integers (a_1), (a_2), and (n). The constraints are (-100 \leq a_1, a_2 \leq 100) and (0 < n \leq 1000).
Output Format
An integer representing the value of the (n)-th term.
1 4 100
298