mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1248.pas
This commit is contained in:
parent
46e96bb030
commit
80c9367ba5
17
VIJOS/1248.pas
Normal file
17
VIJOS/1248.pas
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
var m,s:double;
|
||||||
|
k,x1,x2,x3,x4,i1,i2,i3,i4,v:longint;
|
||||||
|
begin
|
||||||
|
read(k,x1,x2,x3,x4);
|
||||||
|
m:=maxlongint;
|
||||||
|
for i1:=0 to 10 do
|
||||||
|
for i2:=0 to 10 do
|
||||||
|
for i3:=0 to 10 do
|
||||||
|
for i4:=0 to 10 do
|
||||||
|
if (i1+i2+i3+i4<=k) then
|
||||||
|
begin
|
||||||
|
v:=(10+i4)x4;
|
||||||
|
s:=(20-i12)x1+(100-i27)x22/v+(100-i39)x3/v;
|
||||||
|
if (s<m) and (v>0) then m:=s;
|
||||||
|
end;
|
||||||
|
write(m:0:3);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user