Cake This is a e-olymp programming question mathematical optimization.
In honor of the birth of an heir Tutti royal chef has prepared a huge cake, that was put on the table for Three Fat Man. The first fat man can eat the cake by himself for t1 hours, second - for t2 hours, and the third - for t3 hours.
For what time can the cake be eaten simultaneously by all three fat men?
I had used this formula. But it is giving wrong answer.
ans=((t1/3.0)+(t2/3.0)+(t3/3.0))/3.0
Please anyone help me.