and your solution has been accepted?
I've tried this one, but still WA
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
//float n;
double n,p;
cout.precision(0);
//while (cin >> n >> p) cout << long(exp(log(p)/n)) << endl;
while (cin >> n >> p) cout << long(pow(p,1/n ...
Search found 3 matches
- Mon Dec 27, 2010 9:09 pm
- Forum: Volume 1 (100-199)
- Topic: 113 - Power of Cryptography
- Replies: 163
- Views: 50516
- Sun Dec 26, 2010 12:10 pm
- Forum: Volume 1 (100-199)
- Topic: 113 - Power of Cryptography
- Replies: 163
- Views: 50516
Re: 113 why not AC?
WA ;(
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
float n;
double p;
cout.precision(0);
//while (cin >> n >> p) cout << long(exp(log(p)/n)) << endl;
while (cin >> n >> p) cout << long(pow(p,1/n)) << endl;
return 0;
}
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
float n;
double p;
cout.precision(0);
//while (cin >> n >> p) cout << long(exp(log(p)/n)) << endl;
while (cin >> n >> p) cout << long(pow(p,1/n)) << endl;
return 0;
}
- Sun Dec 26, 2010 3:38 am
- Forum: Volume 1 (100-199)
- Topic: 113 - Power of Cryptography
- Replies: 163
- Views: 50516
Re: 113 why not AC?
Can someone say me about mistakes in my code? There should not be any problems with vars range (I've used float and double). So where can the problem hide?
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
float n;
double p;
while (cin >> n >> p) cout << exp(log(p) / n ...
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
float n;
double p;
while (cin >> n >> p) cout << exp(log(p) / n ...