HDU-5810-Balls and Boxes-数学推导(找规律)
来源:互联网 发布:淘宝装修全套教程 编辑:程序博客网 时间:2024/05/16 19:10
题意:n个球,放到m个盒子里,问每个盒子球个数的方差的均值。
思路:题解给出了神奇的数学推导,其实打张表很容发现规律
#include<bits/stdc++.h>using namespace std;int main(){ long long n,m; while(scanf("%lld%lld",&n,&m)&&(n+m)!=0) { long long x=n*(m-1); long long y=m*m; long long tt=__gcd(x,y); if(tt==0) { printf("0/1\n"); } else { printf("%lld/%lld\n",x/tt,y/tt); } } return 0;}
0 0
- HDU-5810-Balls and Boxes-数学推导(找规律)
- hdu 5810 Balls and Boxes (数学)
- HHU Boxes and Balls(找规律)
- HDU 5810 Balls and Boxes (找公式)
- 数学,期望(Balls and Boxes,HDU 5810)
- HHUOJ 1020 Boxes and Balls(找规律)
- hdu5810——Balls and Boxes(数学推导)
- HDU 5810 Balls and Boxes(概率)
- HDU 5810 Balls and Boxes
- hdu 5810 Balls and Boxes
- Contest1002 - HHU ACM 综合训练1 C题 Boxes and Balls(找规律)
- HDU-5881-Tea-找规律+数学推导
- hdu5810 Balls and Boxes(数学)
- HDU 5810 Balls and Boxes(打表找规律)——2016 Multi-University Training Contest 7 1002
- HDU-5810-Balls and Boxes(方差期望)
- [HDU 5810] Balls and Boxes (随机变量计算期望)
- hdu 5810 Balls and Boxes 推公式 ( 多校)
- HDU 5810Balls and Boxes【二项分布】
- 博弈论SG函数
- Android开发笔记(一百一十八)自定义悬浮窗
- 线程、同步与锁——Mutex想说爱你不容易
- tcp/udp/http协议详解
- Android 为弹窗添加动画效果
- HDU-5810-Balls and Boxes-数学推导(找规律)
- 跨域请求
- 自建的用户登录执行数据库邮件出现错误
- 通过类,datatable,和List来获得数据库表的联合字段
- Java IO操作——字符编码
- Wiki管理工具生成器
- Android性能分析工具整理汇总
- Android动画(三):属性动画
- LBS应用的路径引导方法