/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
Scanner in
=new Scanner
(System.
in); //Определим суточный рацион
double u,v,w;
u=in.nextDouble();
v=in.nextDouble();
w=in.nextDouble();
//Определим остаток запасов и количество голов в стаде
double k,s,t,f;
k=in.nextDouble();
s=in.nextDouble();
t=in.nextDouble();
f=in.nextDouble();
//Опередлим значения убытков
double p,q,r,h;
p=in.nextDouble();
q=in.nextDouble();
r=in.nextDouble();
h=in.nextDouble();
int a=0;
double z
=Math.
round(0.01*p
*k
); // Количество коров, погибающих в день while ((s>=u*k)&&(t>=v*k)&&(f>=w*k)&&(k>0))
{
a++;
s-=(u*k+0.01*q*s);
t-=(v*k+0.01*r*t);
f-=(w*k+0.01*h*f);
k-=z;
}
if (s
<u
*k
) System.
out.
println("сено закончится."); if (t
<v
*k
) System.
out.
println("силос закончится ."); if (f
<w
*k
) System.
out.
println("комбикорм закончится ."); if (k
<=0) System.
out.
println("все коровы умрут. ");
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJIFNjYW5uZXIgaW49bmV3IFNjYW5uZXIoU3lzdGVtLmluKTsJCSAKICAgIC8v0J7Qv9GA0LXQtNC10LvQuNC8INGB0YPRgtC+0YfQvdGL0Lkg0YDQsNGG0LjQvtC9CiAgICBkb3VibGUgdSx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