1. 코드
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int Test = Integer.parseInt(bf.readLine());
StringBuilder sb = new StringBuilder();
for (int i = 0; i < Test; i++) {
String dabf = bf.readLine();
String[] dabf_arr = dabf.split(" ");
double D = Double.parseDouble(dabf_arr[0]);
double A = Double.parseDouble(dabf_arr[1]);
double B = Double.parseDouble(dabf_arr[2]);
double F = Double.parseDouble(dabf_arr[3]);
double time = D/(A+B);
double F_distance = F * time;
String answer = String.format("%.10f", F_distance);
sb.append("#").append(i+1).append(" ").append(answer).append("\n");
}
System.out.println(sb.toString().trim());
}
}