题面
设 GDP 的年增长率为 r,n 年后的 GDP 值是现值的多少倍?
例如:n=10,r=7%, 倍数 p=1.97。
输入以空格分隔的 n 和 r(均为整数), 输出倍数 p,四舍五入保留 2 位小数。
例如:
输入:10 7
输出:1.97
Hint:
计算公式如下:p=(1+r)<sup>n</sup>
标准库中的函数 pow(x,y),计算 x<sup>y</sup>。
输入格式
<font color="#000000"><span courier="" mso-ansi-language:="" mso-bidi-font-family:="" mso-bidi-font-weight:="" mso-bidi-language:="" mso-fareast-language:="" mso-fareast-theme-font:="" mso-hansi-font-family:="" style="font-family: 宋体 ; font-size: 14pt; mso-ascii-font-family: "> 在一行中输入空格分隔的 </span><span courier="" lang="EN-US" mso-ansi-language:="" mso-bidi-font-weight:="" mso-bidi-language:="" mso-fareast-font-family:="" mso-fareast-language:="" mso-fareast-theme-font:="" style="font-family: ; font-size: 14pt">n</span><span courier="" mso-ansi-language:="" mso-bidi-font-family:="" mso-bidi-font-weight:="" mso-bidi-language:="" mso-fareast-language:="" mso-fareast-theme-font:="" mso-hansi-font-family:="" style="font-family: 宋体 ; font-size: 14pt; mso-ascii-font-family: "> 和 </span><span courier="" lang="EN-US" mso-ansi-language:="" mso-bidi-font-weight:="" mso-bidi-language:="" mso-fareast-font-family:="" mso-fareast-language:="" mso-fareast-theme-font:="" style="font-family: ; font-size: 14pt">r(</span><span courier="" mso-ansi-language:="" mso-bidi-font-family:="" mso-bidi-font-weight:="" mso-bidi-language:="" mso-fareast-language:="" mso-fareast-theme-font:="" mso-hansi-font-family:="" style="font-family: 宋体 ; font-size: 14pt; mso-ascii-font-family: "> 均为整数 </span><span courier="" lang="EN-US" mso-ansi-language:="" mso-bidi-font-weight:="" mso-bidi-language:="" mso-fareast-font-family:="" mso-fareast-language:="" mso-fareast-theme-font:="" style="font-family: ; font-size: 14pt">)</span><span courier="" mso-ansi-language:="" mso-bidi-font-family:="" mso-bidi-font-weight:="" mso-bidi-language:="" mso-fareast-language:="" mso-fareast-theme-font:="" mso-hansi-font-family:="" style="font-family: 宋体 ; font-size: 14pt; mso-ascii-font-family: ">。</span></font>
输出格式
<font color="#000000"><span courier="" mso-ansi-language:="" mso-bidi-font-family:="" mso-bidi-font-weight:="" mso-bidi-language:="" mso-fareast-language:="" mso-fareast-theme-font:="" mso-hansi-font-family:="" style="font-family: 宋体 ; font-size: 14pt; mso-ascii-font-family: "> 在一行中输出倍数 </span><span courier="" lang="EN-US" mso-ansi-language:="" mso-bidi-font-weight:="" mso-bidi-language:="" mso-fareast-font-family:="" mso-fareast-language:="" mso-fareast-theme-font:="" style="font-family: ; font-size: 14pt">p</span><span courier="" mso-ansi-language:="" mso-bidi-font-family:="" mso-bidi-font-weight:="" mso-bidi-language:="" mso-fareast-language:="" mso-fareast-theme-font:="" mso-hansi-font-family:="" style="font-family: 宋体 ; font-size: 14pt; mso-ascii-font-family: ">,四舍五入保留 </span><span courier="" lang="EN-US" mso-ansi-language:="" mso-bidi-font-weight:="" mso-bidi-language:="" mso-fareast-font-family:="" mso-fareast-language:="" mso-fareast-theme-font:="" style="font-family: ; font-size: 14pt">2</span><span courier="" mso-ansi-language:="" mso-bidi-font-family:="" mso-bidi-font-weight:="" mso-bidi-language:="" mso-fareast-language:="" mso-fareast-theme-font:="" mso-hansi-font-family:="" style="font-family: 宋体 ; font-size: 14pt; mso-ascii-font-family: "> 位小数。</span></font>
样例
输入
10 7
输出
1.97