mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-11-27 08:26:20 +00:00
15 lines
238 B
C
15 lines
238 B
C
#include <stdio.h>
|
|
|
|
int n;
|
|
double p1, p2, p3, q1, q2, q3;
|
|
|
|
int main() {
|
|
scanf("%d%lf%lf%lf%lf%lf%lf", &n, &p1, &p2, &p3, &q1, &q2, &q3);
|
|
|
|
double win = p1 * q2 + p2 * q3 + p3 * q1;
|
|
|
|
printf("%.4lf\n", win * n);
|
|
|
|
return 0;
|
|
}
|