A. Elephant
题目连接:
http://www.codeforces.com/contest/617/problem/A
Descriptionww.co
An elephant decided to visit his friend. It turned out that the elephant's house is located at point 0 and his friend's house is located at point x(x > 0) of the coordinate line. In one step the elephant can move 1, 2, 3, 4 or 5 positions forward. Determine, what is the minimum number of steps he need to make in order to get to his friend's house.
Input
The first line of the input contains an integer x (1 ≤ x ≤ 1 000 000) — The coordinate of the friend's house.
Output
Print the minimum number of steps that elephant needs to make to get from point 0 to point x.
Sample Input
6
Sample Output
2
Hint
题意
给你一个数x,然后让你输出x/5的向上取整
题解:
输出(x+4)/5就好了
代码
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long x;
cin>>x;
cout<<(x+4)/5<<endl;
}
Codeforces Round #340 (Div. 2) A. Elephant 水题的更多相关文章
-
Codeforces Round #340 (Div. 2) B. Chocolate 水题
B. Chocolate 题目连接: http://www.codeforces.com/contest/617/problem/D Descriptionww.co Bob loves everyt ...
-
Codeforces Round #340 (Div. 2) D. Polyline 水题
D. Polyline 题目连接: http://www.codeforces.com/contest/617/problem/D Descriptionww.co There are three p ...
-
Codeforces Round #185 (Div. 2) B. Archer 水题
B. Archer Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/312/problem/B D ...
-
Codeforces Round #360 (Div. 2) A. Opponents 水题
A. Opponents 题目连接: http://www.codeforces.com/contest/688/problem/A Description Arya has n opponents ...
-
Codeforces Round #190 (Div. 2) 水果俩水题
后天考试,今天做题,我真佩服自己... 这次又只A俩水题... orz各路神犇... 话说这次模拟题挺多... 半个多小时把前面俩水题做完,然后卡C,和往常一样,题目看懂做不出来... A: 算是模拟 ...
-
Codeforces Round #256 (Div. 2/A)/Codeforces448A_Rewards(水题)解题报告
对于这道水题本人觉得应该应用贪心算法来解这道题: 下面就贴出本人的代码吧: #include<cstdio> #include<iostream> using namespac ...
-
Codeforces Round #338 (Div. 2) A. Bulbs 水题
A. Bulbs 题目连接: http://www.codeforces.com/contest/615/problem/A Description Vasya wants to turn on Ch ...
-
Codeforces Round #282 (Div. 1) A. Treasure 水题
A. Treasure Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/494/problem/A ...
-
Codeforces Round #327 (Div. 2) B. Rebranding 水题
B. Rebranding Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/591/problem ...
随机推荐
-
list、set、map、array间的相互转换
list.set.map.array间的相互转换 list转set Set set = new HashSet(new ArrayList()); set转list List list = new A ...
-
Python定时调度--多任务同一时间开始跑 scheduler.enterabs
Event Priorities If more than one event is scheduled for the same time their priority values are use ...
-
CF下的BackgroudWorker组件优化.
.net compact framwork(2.0/3.5)下没有Backgroundworder组件,在网上找了一个类 经过使用发现了一些问题,主要有一个问题:在一个Dowork事件中对Report ...
-
Lucene学习总结之三:Lucene的索引文件格式(1)
Lucene的索引里面存了些什么,如何存放的,也即Lucene的索引文件格式,是读懂Lucene源代码的一把钥匙. 当我们真正进入到Lucene源代码之中的时候,我们会发现: Lucene的索引过程, ...
-
OpenGL的状态机理解
OpenGL是一种状态机模式,比如你用glEnable打开一个状态,在以后的绘图中将一直保留并应用这个状态,除非你调用glDisable及同类函数来改变该状态或程序退出.例如当前颜色是一个状态变量,可 ...
-
JS内置对象有哪些?
JS内置对象分为数据封装类对象和其他对象 数据封装类对象:String,Boolean,Number,Array,和Object; 其他对象:Function,Arguments,Math,Date, ...
-
移动端(微信等)使用 vConsole 调试 console
参考链接:https://blog.csdn.net/m0_37036014/article/details/80113635
-
健康检测文件httpchk.jsp
静态显示: <html><body><center> Now time is: <%=new java.util.Date()%> </cente ...
-
转:存储之直连存储Dell Powervault MD 3000
存储之直连存储DellPowervault MD 3000 存储根据服务器类型可以分为:封闭系统的存储和开放系统的存储 1.封闭系统的存储:封闭系统主要指大型机,AS400等服务器 2.开放系统的存储 ...
-
Unsorted, maximum ==>; sorted
https://github.com/Premiumlab/Python-for-Algorithms--Data-Structures--and-Interviews/blob/master/Moc ...