#include <iostream>
#include <stdio.h>
#include <cstring>
#include <math.h>
using namespace std; double GetP(int x, int N)
{
return (2.0*x*(N-x+)-)/N/N;
} double P2E(double p, int k)
{
return (-pow(-*p, k))/;
} double GetE(int N, int M, int P, int K)
{
double px,py,pz;
double e=;
for(int x=;x<=N;x++)
{
px = GetP(x, N);
for(int y=;y<=M;y++)
{
py = GetP(y, M);
for(int z=;z<=P;z++)
{
pz = GetP(z, P);
e += P2E(px*py*pz, K);
}
}
}
return e;
} int main()
{
int N,M,P,K;
int t;
scanf("%d",&t);
for(int i=;i<=t;i++)
{
scanf("%d%d%d%d", &N,&M,&P,&K);
printf("Case %d: %.10lf\n", i, GetE(N,M,P,K));
}
return ;
}

最新文章

  1. WPF菜单
  2. DataGridView里CheckBox实现全选控制
  3. iOS GCD中的dispatch_group
  4. Sharepoint 2013 发布功能(Publishing features)
  5. Appium学习路-打包apk和ipa篇
  6. Repeater控件使用(含删除,分页功能)
  7. vijos p1002 dp ***
  8. Loadrunner监控Centos
  9. SPRING IN ACTION 第4版笔记-第三章ADVANCING WIRING-008-SpEL介绍
  10. 用c语言程序对显存进行操作
  11. leetcode &amp; lintcode for bug-free
  12. 关于WebApi 跨域问题的解决的方式
  13. 【Swift】 iOS开发容易产生Bug的地方
  14. django 2.1 配sql server 2008R2
  15. Java爬虫模拟登录——不给我毛概二的H某大学
  16. ABAP-IDOC配置
  17. springcloud之eureka配置——eureka.instance
  18. day27(反射之内省机制)
  19. Percona XtraDB Cluster
  20. STL容器读书笔记

热门文章

  1. socket()模块和套接字对象的内建方法
  2. 类百度DOC编辑区域
  3. $GitHub边用边总结
  4. centos磁盘安装与磁盘分区方案
  5. 【HackerRank】Insertion Sort Advanced Analysis(归并排序求数列逆序数对)
  6. 【转载】linux获取mac地址
  7. Python编程-异常处理
  8. Android系统--输入系统(二)必备Linux知识_实现inotify_epoll.c
  9. c++ boost库学习三:实用工具
  10. springmvc-restful