Birinci tovuzun məhsuldarlığı saatda 1 / t_1 piroq olacaq. Eynilə, ikinci və üçüncü tovuzların piroq yemə məhsuldarlıqları saatda 1 / t_2 və 1 / t_3 piroq olacaq. Əgər tovuzlar eyni zamanda piroqu yesələr, onda bir saat ərzində 1 / t_1 + 1 / t_2 + 1 / t_3 hissəsi piroqu yeyəcəklər. Buna görə, bütün piroq 1 / (1 / t_1 + 1 / t_2 + 1 / t_3) saat ərzində yeyiləcək.
Nümunə
Üç tovuz piroqu 1 / (1 / 3 + 1 / 3 + 1 / 3) = 1 saatda yeyəcək.
Giriş məlumatlarını oxuyun. Cavabı formulla hesablayın və çıxış edin.
scanf("%d %d %d", &t1, &t2, &t3);
res = 1.0 / (1.0/t1 + 1.0/t2 + 1.0/t3);
printf("%.2lf\n", res);import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner con = new Scanner(System.in);
int t1 = con.nextInt(),
t2 = con.nextInt(),
t3 = con.nextInt();
double res = 1.0 / (1.0/t1 + 1.0/t2 + 1.0/t3);
System.out.println(res);
con.close();
}
}