Codeforces Round #340 (Div. 2) A. Elephant 水题
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 ...
随机推荐
- 把raw目录下的几张照片存放到SD卡里面去
try { //SD卡路径 String filename =android.os.Environment .getExternalStorageDirectory().getAbsolutePath ...
- 【LeetCode】202 - Happy Number
Write an algorithm to determine if a number is "happy". A happy number is a number defined ...
- HDU ACM 2121 Ice_cream’s world II (无根最小树形图)
[解题思路]这题先看了NotOnlySuccess的解题思路,即设置虚根再处理的做法:弄了一个上午,再次有种赶脚的感觉~~如果需要找出为什么需要去比所有权值之和更大的数为新增的虚边的话,一开始我理解仅 ...
- js_sl 无缝切换
<!doctype html> <html> <head> <meta charset="utf-8"> <title> ...
- NovaMind *的安装、和谐破解到永久使用
XMind *思维导图的安装步 同类型的软件,这两款软件: XMind 和 NovaMind,各有所长.建议,都安装,合适的时候方便使用. XMind界面如下: NovaMind界面如下: 本博文,主 ...
- 何时使用hadoop fs、hadoop dfs与hdfs dfs命令
hadoop fs:使用面最广,可以操作任何文件系统. hadoop dfs与hdfs dfs:只能操作HDFS文件系统相关(包括与Local FS间的操作),前者已经Deprecated,一般使用后 ...
- 1.VS2010C++环境设置
一.需要下载的软件 1.visual studio 2010\\xxzx\tools\编程工具\MICROSOFT\VISUAL.STUDIO\VISUAL.STUDIO.201032位cn_visu ...
- What's Exposure?
[What's Exposure?] ISO:即相机的感光度.ISO数值的大小是DC对光线反应的敏感程度测量值,通常以ISO数值表示,数值越大表示对光线的敏感性越强,数值越小表示越弱,是控制曝光量的一 ...
- JAVA应用apache httpclient探测http服务
代码很简单,apache都已经提供了封装. import org.apache.commons.httpclient.HttpClient; import org.apache.commons.htt ...
- 全球各大运营商黑莓ROM官网下载链接汇总
全球各大运营商黑莓ROM官网下载链接汇总: 先来关于8830的. 4.2.2.196的rom 8830EFS_PBr4.2.2_rel365_PL3.0.0.85_A4.2.2.196_Sprint ...