QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#496273 | #9136. Exponent Calculator | ucup-team3695# | AC ✓ | 0ms | 3600kb | C++20 | 1.9kb | 2024-07-28 05:45:16 | 2024-07-28 05:45:16 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
double f(double x)
{
double u = 2.4797803147415158e-05;
u = u * x + 0.00019845053428537996;
u = u * x + 0.0013888889639455432;
u = u * x + 0.008333333160200072;
u = u * x + 0.041666666666343694;
u = u * x + 0.16666666666696003;
u = u * x + 0.50000000000000044;
u = u * x + 0.99999999999999989;
return u * x + 1;
}
int mainn()
{
double u, v;
for (;;)
{
cin >> u;
u = u * 0.0078125;
v = 0.000024797803147415158;
v = v * u;
v = v + 0.00019845053428537996;
v = v * u;
v = v + 0.0013888889639455432;
v = v * u;
v = v + 0.008333333160200072;
v = v * u;
v = v + 0.041666666666343694;
v = v * u;
v = v + 0.16666666666696003;
v = v * u;
v = v + 0.50000000000000044;
v = v * u;
v = v + 0.99999999999999989;
v = v * u;
v = v + 1;
v = v * v;
v = v * v;
v = v * v;
v = v * v;
v = v * v;
v = v * v;
v = v * v;
cout << setprecision(10) << v << endl;
}
return 0;
}
int main()
{
cout << 25 << endl;
cout << "$1 = $1 * 0.0078125" << endl;
cout << "$0 = 0.000024797803147415158" << endl;
cout << "$0 = $0 * $1" << endl;
cout << "$0 = $0 + 0.00019845053428537996" << endl;
cout << "$0 = $0 * $1" << endl;
cout << "$0 = $0 + 0.0013888889639455432" << endl;
cout << "$0 = $0 * $1" << endl;
cout << "$0 = $0 + 0.008333333160200072" << endl;
cout << "$0 = $0 * $1" << endl;
cout << "$0 = $0 + 0.041666666666343694" << endl;
cout << "$0 = $0 * $1" << endl;
cout << "$0 = $0 + 0.16666666666696003" << endl;
cout << "$0 = $0 * $1" << endl;
cout << "$0 = $0 + 0.50000000000000044" << endl;
cout << "$0 = $0 * $1" << endl;
cout << "$0 = $0 + 0.99999999999999989" << endl;
cout << "$0 = $0 * $1" << endl;
cout << "$0 = $0 + 1" << endl;
for (int i = 0; i < 7; i++)
cout << "$0 = $0 * $0" << endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3600kb
input:
input
output:
25 $1 = $1 * 0.0078125 $0 = 0.000024797803147415158 $0 = $0 * $1 $0 = $0 + 0.00019845053428537996 $0 = $0 * $1 $0 = $0 + 0.0013888889639455432 $0 = $0 * $1 $0 = $0 + 0.008333333160200072 $0 = $0 * $1 $0 = $0 + 0.041666666666343694 $0 = $0 * $1 $0 = $0 + 0.16666666666696003 $0 = $0 * $1 $0 = $0 + 0.5...
result:
ok max relative diff is 1.18643e-11. Checker runtime is 158 ms
Extra Test:
score: 0
Extra Test Passed