QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#494866 | #9136. Exponent Calculator | ucup-team3510# | AC ✓ | 0ms | 3740kb | C++20 | 690b | 2024-07-27 17:21:24 | 2024-07-27 17:21:25 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int rev[1005];
int main()
{
int n, i;
long double ans = (long double)(1) / (7);
double x = 20, y;
rev[8] = 1;
for(i = 7; i >= 1; i--)
rev[i] = rev[i + 1] * i;
printf("25\n");
printf("$1 = $1 * %.100Lf\n", (long double)(1) / 1024);
x /= 1024;
printf("$0 = $1 + %d\n", rev[7]);
y = y + rev[7];
for(i = 6; i >= 1; i--)
{
printf("$0 = $0 * $1\n");
y = y * x;
printf("$0 = $0 + %d\n", rev[i]);
y = y + rev[i];
ans /= i;
}
printf("$0 = $0 * %.100Lf\n", ans);
y = y * ans;
for(i = 1; i <= 10; i++)
{
printf("$0 = $0 * $0\n");
y = y * y;
}
// printf("%.100lf\n", y);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3740kb
input:
input
output:
25 $1 = $1 * 0.0009765625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 $0 = $1 + 7 $0 = $0 * $1 $0 = $0 + 42 $0 = $0 * $1 $0 = $0 + 210 $0 = $0 * $1 $0 = $0 + 840 $0 = $0 * $1 $0 = $0 + 2520 $0 = $0 * $1 $0 = $0 + 5040 $0 = $0 * $1 $0 = $0 + 5040 $0 = $0 ...
result:
ok max relative diff is 2.92001e-13. Checker runtime is 198 ms
Extra Test:
score: 0
Extra Test Passed