QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#496795 | #9136. Exponent Calculator | ucup-team4361# | WA | 0ms | 4092kb | C++14 | 1.9kb | 2024-07-28 16:07:27 | 2024-07-28 16:07:27 |
Judging History
answer
#include <bits/stdc++.h>
#define LL long long
#define ull unsigned long long
#define F(i, j, k) for (int i = j; i <= k; ++i)
#define DF(i, j, k) for (int i = j; i >= k; --i)
using namespace std;
template <typename T> inline void read(T &n) {
T w = 1;
n = 0;
char ch = getchar();
while (!isdigit(ch) && ch != EOF) {
if (ch == '-') w = -1;
ch = getchar();
}
while (isdigit(ch) && ch != EOF) {
n = (n << 3) + (n << 1) + (ch & 15);
ch = getchar();
}
n *= w;
}
template <typename T> inline void write(T x) {
T l = 0;
ull y = 0;
if (!x) { putchar(48); return; }
if (x < 0) { x = -x; putchar('-'); }
while (x) { y = y * 10 + x % 10; x /= 10; ++l; }
while (l) { putchar(y % 10 + 48); y /= 10; --l; }
}
template <typename T> inline void writes(T x) {
write(x);
putchar(' ');
}
template <typename T> inline void writeln(T x) {
write(x);
puts("");
}
template <typename T> inline void checkmax(T &a, T b) { a = a > b ? a : b; }
template <typename T> inline void checkmin(T &a, T b) { a = a < b ? a : b; }
int main() {
//freopen(".in", "r", stdin);
//freopen(".out", "w", stdout);
cout << 25 << '\n';
double x = 1;
F(i, 1, 17) x = x * 0.5;
cout << fixed << setprecision(23) << "$1 = $1 * " << x << '\n';
cout << "$2 = $1 * $1\n";
cout << "$2 = $2 * 0.5\n";
cout << "$3 = $2 * $1\n";
cout << "$3 = $3 *" << fixed << setprecision(17) << 1.0 / 6 << '\n';
double now = pow(x * 20, 3) * 1.0 / 6 + x * 20 * x * 10 + x * 20.0 + 1;
cout << "$0 = $1 + 1\n";
cout << "$0 = $0 + $2\n";
cout << "$0 = $0 + $3\n";
F(i, 1, 17) {
cout << "$0 = $0 * $0\n";
now *= now;
}
//cout << fixed << setprecision(10) << now << ' ' << exp(20) << '\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 4092kb
input:
input
output:
25 $1 = $1 * 0.00000762939453125000000 $2 = $1 * $1 $2 = $2 * 0.5 $3 = $2 * $1 $3 = $3 *0.16666666666666666 $0 = $1 + 1 $0 = $0 + $2 $0 = $0 + $3 $0 = $0 * $0 $0 = $0 * $0 $0 = $0 * $0 $0 = $0 * $0 $0 = $0 * $0 $0 = $0 * $0 $0 = $0 * $0 $0 = $0 * $0 $0 = $0 * $0 $0 = $0 * $0 $0 = $0 * $0 $0 = $0 * $...
result:
wrong answer x=-20,jury=2.06115e-09,participant=2.06115e-09,error=3.88023e-08