2515 - 概率论与数理统计第四章第3题
1、 一对恋人甲乙由于种种原因在现实中不得不分居两地,他们相约在2046年3月18日12:00~13:00在火车站会面,设X、Y分别是甲、乙到达的时间,且甲乙并未通过其他方式进行联系,已知X、Y的概率密度分别为:

求先到达者需要等待的时间的数学期望。
<br />
Input
0
Output
0.20
Examples
Input
0
Output
0.20
Solution C
#include "stdio.h" int main() { int a; float b; while(scanf("%d",&a) != EOF) { if (a==1) b=1.0/4; else if (a==0) b=0.20; printf("%.2f\n",b); } return 0; }
Solution C++
#include <stdio.h> int main() { int a; float b; while(scanf("%d",&a) != EOF) {if (a==1) b=0.25; //将“作业答案”替换为该题答案。若有多行,用多行重复输出。 else if (a==0) b=0.20; printf("%.2f\n",b);} return 0; }