描述 現在給你兩個數 n 和 p ,讓你求出 p 的開 n 次方。
- 輸入
- 每組數據包含兩個數n和p。當n和p都爲0時表示輸入結束。(1<=n<=200,1<=p<=10^101)
- 輸出
- 對於每個輸出對用輸出開方後的結果k(結果小於10^9)。
- 樣例輸入
-
2 16 3 27 7 4357186184021382204544 0 0
- 樣例輸出
-
4 3 1234
-
-
-
<span style="font-size:18px;">#include<stdio.h> #include <math.h> int main() { double n,p,t; while(scanf("%lf%lf",&n,&p)!=EOF) { if(n==0&&p==0) break; t=pow(p,1/n); printf("%.lf\n",t); } return 0; }</span>