码迷,mamicode.com
首页 > 其他好文 > 详细

Codeforces Round #430 (Div. 2) A

时间:2017-08-30 20:03:40      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:bsp   nbsp   codeforce   int   typedef   ret   class   style   cout   

题意:给你药水经验的区间和成本的区间,问是否有一个比例完全==k

 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 typedef long long ll;
 4 const int N=1e5+10;
 5 
 6 double l,r,x,y,k;
 7 int main(){
 8     scanf("%lf%lf%lf%lf%lf",&l,&r,&x,&y,&k);
 9     for(int i=x;i<=y;i++){
10         double z=i*k;
11         if(z<=r&&z>=l){
12             cout<<"YES"<<endl;return 0;
13         }
14     }
15     cout<<"NO"<<endl;
16 }

 

Codeforces Round #430 (Div. 2) A

标签:bsp   nbsp   codeforce   int   typedef   ret   class   style   cout   

原文地址:http://www.cnblogs.com/hhxj/p/7454723.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!