mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-11-27 08:26:20 +00:00
23 lines
344 B
C
23 lines
344 B
C
#include <stdio.h>
|
|
|
|
int main() {
|
|
int n;
|
|
|
|
scanf("%d\n", &n);
|
|
|
|
for (int i = 1; i <= n; i++) {
|
|
char c;
|
|
double h;
|
|
|
|
scanf("%c %lf\n", &c, &h);
|
|
|
|
if (c == 'M') {
|
|
printf("%.2lf\n", h / 1.09);
|
|
} else { // c == 'F'
|
|
printf("%.2lf\n", h * 1.09);
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|