QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#499666 | #9136. Exponent Calculator | ucup-team3555 | AC ✓ | 0ms | 3848kb | C++20 | 474b | 2024-07-31 16:44:12 | 2024-07-31 16:44:21 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int N=10;
int fac[N],B=10;
int main(){
cout<<fixed<<setprecision(20);
cout<<"25\n$1 = $1 * "<<1.0/(1<<B)<<'\n';
fac[0]=1;
for(int i=1;i<=7;i++) fac[i]=fac[i-1]*i;
cout<<"$0 = $1 * "<<1.0/fac[7]<<'\n';
for(int i=6;i>=1;i--){
cout<<"$0 = $0 + "<<1.0/fac[i]<<'\n';
cout<<"$0 = $0 * $1\n";
}
cout<<"$0 = $0 + 1.0\n";
for(int i=1;i<=B;i++) cout<<"$0 = $0 * $0\n";
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3848kb
input:
input
output:
25 $1 = $1 * 0.00097656250000000000 $0 = $1 * 0.00019841269841269841 $0 = $0 + 0.00138888888888888894 $0 = $0 * $1 $0 = $0 + 0.00833333333333333322 $0 = $0 * $1 $0 = $0 + 0.04166666666666666435 $0 = $0 * $1 $0 = $0 + 0.16666666666666665741 $0 = $0 * $1 $0 = $0 + 0.50000000000000000000 $0 = $0 * $1 $...
result:
ok max relative diff is 2.11491e-13. Checker runtime is 199 ms
Extra Test:
score: 0
Extra Test Passed