-->
当前位置:首页 > 题库

PROGRAMMING:High precision operation

Luz5年前 (2021-05-10)题库458
Give the values of N and a respectively (both are integers, 1 < = n < = 150, 0 < = a < = 15). Please give the Series $$\ Quad \ \ sum_{ I = 1} ^ {n} I * a ^ {I} $$.
###Input format:
There are multiple groups of test data, each group of test data occupies a row, which contains two integers n and a, separated by spaces.
###Output format:
For each input line, the integer value corresponding to the sum of N and a is output in one line.
###Input example:
```in
3 3
4 4
```
###Output example:
```out
one hundred and two
one thousand two hundred and fifty-two
```







answer:If there is no answer, please comment