QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#499666#9136. Exponent Calculatorucup-team3555AC ✓0ms3848kbC++20474b2024-07-31 16:44:122024-07-31 16:44:21

Judging History

你现在查看的是最新测评结果

  • [2024-07-31 16:44:21]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3848kb
  • [2024-07-31 16:44:12]
  • 提交

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