From eaffde5ae009448aceceb4034799dc21a47ec384 Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Sun, 1 May 2016 10:46:56 -0500 Subject: [PATCH] Create 1079.cpp --- QUSTOJ/1079.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 QUSTOJ/1079.cpp diff --git a/QUSTOJ/1079.cpp b/QUSTOJ/1079.cpp new file mode 100644 index 0000000..f5bc31a --- /dev/null +++ b/QUSTOJ/1079.cpp @@ -0,0 +1,20 @@ +#include +int main() +{ +int n,x1,x2,x3,x4,i,j,k,m,s,v; +double time,min; +min=2000; +scanf("%d%d%d%d%d",&n,&x1,&x2,&x3,&x4); +for(i=0;i<=10;i++) +for(j=0;j<=10;j++) +for(k=0;k<=10;k++) +if((i+j+k)<=n) +{ +m=n-i-j-k; +time=((20.0-i*2)*x1+((100.0-j*7)*x2*2+(100.0-k*9)*x3)/((10.0+m)*x4)); +if(time