374. Save Vasya

Time limit per test: 0.25 second(s)
Memory limit: 65536 kilobytes
input: standard
output: standard

Vasya has huge problems. He needs to take polynomial ax + b, then calculate its k-th power and evaluate the sum of its coefficients. Your task is to help him.

The first line of the input contains three integers a, b and k (1 ≤ a, b≤ 100, 1≤ k≤ 20).

The first line must contain the sum of coefficients of the resulting polynomial.

sample input
sample output
1 2 2

Online Contester Team © 2002 - 2010. All rights reserved.