CodeForces - 842A

需要将除法改换成乘法进行计算

 #include<bits/stdc++.h>
using namespace std; int main() {
long long l,r,x,y;
long long k;
while(~scanf("%lld %lld %lld %lld %lld",&l,&r,&x,&y,&k)) { int flag = ;
for(int i = x; i <= y; i++) {
if( l <= i*k && i*k <= r ) {
flag = ;
break;
}
}
if(flag)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
return ;
}

在写这种题目的时候

    1.使用 long long

     2.把除法改换成乘法

Kirill And The Game CodeForces - 842A的更多相关文章

  1. Codeforces 842A Kirill And The Game【暴力,水】

    A. Kirill And The Game time limit per test:2 seconds memory limit per test:256 megabytes input:stand ...

  2. Codeforces Round #430 A. Kirill And The Game

    Kirill plays a new computer game. He came to the potion store where he can buy any potion. Each poti ...

  3. 【 Codeforces Round #430 (Div. 2) A 】 Kirill And The Game

    [链接]点击打开链接 [题意] 水题 [题解] 枚举b从x..y看看k*i是不是在l..r之间就好. [错的次数] 0 [反思] 在这了写反思 [代码] #include <cstdio> ...

  4. Codeforces Round #430 (Div. 2) 【A、B、C、D题】

    [感谢牛老板对D题的指点OTZ] codeforces 842 A. Kirill And The Game[暴力] 给定a的范围[l,r],b的范围[x,y],问是否存在a/b等于k.直接暴力判断即 ...

  5. Codeforces Round #468 Div. 2题解

    A. Friends Meeting time limit per test 1 second memory limit per test 256 megabytes input standard i ...

  6. python爬虫学习(5) —— 扒一下codeforces题面

    上一次我们拿学校的URP做了个小小的demo.... 其实我们还可以把每个学生的证件照爬下来做成一个证件照校花校草评比 另外也可以写一个物理实验自动选课... 但是出于多种原因,,还是绕开这些敏感话题 ...

  7. 【Codeforces 738D】Sea Battle(贪心)

    http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n g ...

  8. 【Codeforces 738C】Road to Cinema

    http://codeforces.com/contest/738/problem/C Vasya is currently at a car rental service, and he wants ...

  9. 【Codeforces 738A】Interview with Oleg

    http://codeforces.com/contest/738/problem/A Polycarp has interviewed Oleg and has written the interv ...

随机推荐

  1. JavaScript是如何面向对象的

    一.引言 在16年的10月份,在校内双选会找前端实习的时候,hr问了一个问题:JavaScript的面向对象理解吗?我张口就说"JavaScript是基于原型的!".然后就没什么好 ...

  2. spark2.1:flatMap的用法

    代码示例: val sample_data_combine_result=List( (0,(List(FitModel(4022,1447.92,-8.38983306721434,2.0)),1) ...

  3. [转]Python爬虫框架--pyspider初体验

    标签: python爬虫pyspider 2015-09-05 10:57 9752人阅读 评论(0) 收藏 举报  分类: Python(8)  版权声明:本文为博主原创文章,未经博主允许不得转载. ...

  4. JS-DOM ~ 03. 子节点的操作、style.样式和属性、dom元素的创建方法及操作、14个例题、主要是利用js直接控制html属性

    带有Element和不带的区别 a)  带Element的获取的是元素节点 b)  不带可能获取文本节点和属性节点 获取所以子节点 a)   . childNodes b)   . children ...

  5. 定点分析: MySQL InnoDB是如何保证系统异常断电情况下的数据可靠性?

    MySQL支持事务,所以保证数据可靠的前提是对数据的修改事务已经成功提交 这个问题可以解释为'MySQL InnoDB是如何保证事务C(一致性)D(持久性)性的?' 可能出现的两种情况: (一致性)数 ...

  6. [LeetCode] Student Attendance Record II 学生出勤记录之二

    Given a positive integer n, return the number of all possible attendance records with length n, whic ...

  7. 【BZOJ4033】【HAOI2015】树上染色

    Description 有一棵点数为 N 的树,树边有边权.给你一个在 0~ N 之内的正整数 K ,你要在这棵树中选择 K个点,将其染成黑色,并将其他 的N-K个点染成白色 . 将所有点染色后,你会 ...

  8. hihocoder 1391 树状数组

    #1391 : Countries 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 There are two antagonistic countries, countr ...

  9. 51nod 1270 数组的最大代价

    1270 数组的最大代价题目来源: HackerRank基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 数组A包含N个元素A1, A2......AN.数组B包含N ...

  10. ●BZOJ 3123 [Sdoi2013]森林

    题链: http://www.lydsy.com/JudgeOnline/problem.php?id=3123 题解: 主席树,在线,启发式合并 简单版(只有询问操作):[2588: Spoj 10 ...