1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-11-27 08:26:20 +00:00
202401-programming-assignments/【实践课外】1.顺序结构/7-5 石头剪刀布.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;
}