Start 2024-05-18 14:20:00

20240518下午基础班1

End 2024-05-18 18:00:00
Contest is over.
Now 2026-11-19 00:33:22

C. 计算函数值

Description

输入x和n,递归计算函数px(x,n)=x-x^2+x^3-x^4+…+(-1)^{n-1}x^n的值。

Input

输入两个整数x和n(1\le x\le10,1\le n\le15)。

Output

输出函数的值,小数点后保留两位。

Examples

Input

2 3

Output

6.00

Submit

Login

Signup
Time Limit 1 second
Memory Limit 128 MB
Submit