Codeforces Round #340 (Div. 2) A. Elephant 水题

时间:2022-10-27 23:48:20

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 水题的更多相关文章

  1. Codeforces Round &num;340 &lpar;Div&period; 2&rpar; B&period; Chocolate 水题

    B. Chocolate 题目连接: http://www.codeforces.com/contest/617/problem/D Descriptionww.co Bob loves everyt ...

  2. Codeforces Round &num;340 &lpar;Div&period; 2&rpar; D&period; Polyline 水题

    D. Polyline 题目连接: http://www.codeforces.com/contest/617/problem/D Descriptionww.co There are three p ...

  3. Codeforces Round &num;185 &lpar;Div&period; 2&rpar; B&period; Archer 水题

    B. Archer Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/312/problem/B D ...

  4. Codeforces Round &num;360 &lpar;Div&period; 2&rpar; A&period; Opponents 水题

    A. Opponents 题目连接: http://www.codeforces.com/contest/688/problem/A Description Arya has n opponents ...

  5. Codeforces Round &num;190 &lpar;Div&period; 2&rpar; 水果俩水题

    后天考试,今天做题,我真佩服自己... 这次又只A俩水题... orz各路神犇... 话说这次模拟题挺多... 半个多小时把前面俩水题做完,然后卡C,和往常一样,题目看懂做不出来... A: 算是模拟 ...

  6. Codeforces Round &num;256 &lpar;Div&period; 2&sol;A&rpar;&sol;Codeforces448A&lowbar;Rewards&lpar;水题&rpar;解题报告

    对于这道水题本人觉得应该应用贪心算法来解这道题: 下面就贴出本人的代码吧: #include<cstdio> #include<iostream> using namespac ...

  7. Codeforces Round &num;338 &lpar;Div&period; 2&rpar; A&period; Bulbs 水题

    A. Bulbs 题目连接: http://www.codeforces.com/contest/615/problem/A Description Vasya wants to turn on Ch ...

  8. Codeforces Round &num;282 &lpar;Div&period; 1&rpar; A&period; Treasure 水题

    A. Treasure Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/494/problem/A ...

  9. Codeforces Round &num;327 &lpar;Div&period; 2&rpar; B&period; Rebranding 水题

    B. Rebranding Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/591/problem ...

随机推荐

  1. list、set、map、array间的相互转换

    list.set.map.array间的相互转换 list转set Set set = new HashSet(new ArrayList()); set转list List list = new A ...

  2. Python定时调度--多任务同一时间开始跑 scheduler&period;enterabs

    Event Priorities If more than one event is scheduled for the same time their priority values are use ...

  3. CF下的BackgroudWorker组件优化&period;

    .net compact framwork(2.0/3.5)下没有Backgroundworder组件,在网上找了一个类 经过使用发现了一些问题,主要有一个问题:在一个Dowork事件中对Report ...

  4. Lucene学习总结之三:Lucene的索引文件格式&lpar;1&rpar;

    Lucene的索引里面存了些什么,如何存放的,也即Lucene的索引文件格式,是读懂Lucene源代码的一把钥匙. 当我们真正进入到Lucene源代码之中的时候,我们会发现: Lucene的索引过程, ...

  5. OpenGL的状态机理解

    OpenGL是一种状态机模式,比如你用glEnable打开一个状态,在以后的绘图中将一直保留并应用这个状态,除非你调用glDisable及同类函数来改变该状态或程序退出.例如当前颜色是一个状态变量,可 ...

  6. JS内置对象有哪些?

    JS内置对象分为数据封装类对象和其他对象 数据封装类对象:String,Boolean,Number,Array,和Object; 其他对象:Function,Arguments,Math,Date, ...

  7. 移动端(微信等)使用 vConsole 调试 console

    参考链接:https://blog.csdn.net/m0_37036014/article/details/80113635

  8. 健康检测文件httpchk&period;jsp

    静态显示: <html><body><center> Now time is: <%=new java.util.Date()%> </cente ...

  9. 转:存储之直连存储Dell Powervault MD 3000

    存储之直连存储DellPowervault MD 3000 存储根据服务器类型可以分为:封闭系统的存储和开放系统的存储 1.封闭系统的存储:封闭系统主要指大型机,AS400等服务器 2.开放系统的存储 ...

  10. Unsorted&comma; maximum &equals;&equals;&gt&semi; sorted

    https://github.com/Premiumlab/Python-for-Algorithms--Data-Structures--and-Interviews/blob/master/Moc ...