Back

E. Uncle Rohi

Worth 6 point(s) - Runtime Limit: 3 seconds

Summary

While locked away in prison, old uncle Rohi decides to get in shape. While doing crunches, push-ups, and other favorties, Rohi gets bored. To spice things up, he defines a few fun rules to amend his counting style

Input

You will be given an unknown number of datasets, each only one line long. Each line consists of the problem number P, (1 ≤ P ≤ 100), followed by two integers, X and N, the two values that Rohi is using.

1 7 9
2 60 31
3 10 11
4 5 10
5 53 6

Output

For each dataset, output one line beginning with the problem number P, then a space character, then the number of repetitions Rohi makes.

1 477218588
2 3048041305
3 3904515723
4 858993459
5 1431655757