作者jtmh ()
看板C_and_CPP
标题Re: [ACM ] Q113
时间Sun Feb 1 15:58:27 2009
※ 引述《crycry (哭哭)》之铭言:
: 看起来不难的一题
: 测资也都OK 还是WA @@"
: #include <iostream>
: #include <cmath>
: using namespace std;
: int main()
: {
: double n;
: double p;
: while(cin >> n >> p){
: cout<< pow(p,(double)1/n)<<endl;
: }
: return 0;
: }
: thanks!
有个地方没注意到的样子,
给你我当初的测资:
input:
2
16
3
27
7
4357186184021382204544
output:
4
3
1234
看看你能不能自己找出来?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.175.150.115
1F:推 crycry:似乎是小数点问题 我加setiosflas setprecision就AC了 感谢 02/01 16:36
2F:→ jtmh:恭喜罗! 02/02 00:40