1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-12-03 17:26:21 +00:00
202401-programming-assignments/【实践课外】1.顺序结构/7-5 石头剪刀布.c

15 lines
238 B
C
Raw Normal View History

2024-10-16 11:31:55 +00:00
#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;
}