A. Rounding
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Vasya has a non-negative integer n. He wants to round it to nearest integer, which ends up with 0. If n already ends up with 0, Vasya considers it already rounded.

For example, if n = 4722 answer is 4720. If n = 5 Vasya can round it to 0 or to 10. Both ways are correct.

For given n find out to which integer will Vasya round it.

Input

The first line contains single integer n (0 ≤ n ≤ 109) — number that Vasya has.

Output

Print result of rounding n. Pay attention that in some cases answer isn't unique. In that case print any correct answer.

Examples
input
5
output
0
input
113
output
110
input
1000000000
output
1000000000
input
5432359
output
5432360
Note

In the first example n = 5. Nearest integers, that ends up with zero are 0 and 10. Any of these answers is correct, so you can print 0 or10.

【分析】:注释

【代码】:

#include<cstdio>
#include<iostream>
#include<cmath>
using namespace std;
const int m=;
int n,x,l;
long long ans;
int main()
{
while(~scanf("%d",&n))
{
int t=n%;
if(t==)//尾数为0
{
return *printf("%d\n",n);
}
else if(n<=)//不大于4的个位数
{
return *printf("0\n");
}
else if(n>=&&n<=)//大于4的个位数
{
return *printf("10\n"); }
else if(t>=)//尾数大于4
{
return *printf("%d\n",n+(-t));
}
else if(t<=)//尾数小于4
{
return *printf("%d\n",n-t);
}
}
return ;
}

暴力

最新文章

  1. 高性能 TCP &amp; UDP 通信框架 HP-Socket v3.4.1
  2. Akka框架使用注意点
  3. 简述memcached中的一致哈希
  4. GIMP学习笔记
  5. struts2文件下载 火狐浏览器的文件名乱码问题
  6. spark-shell - 将结果保存成一个文件
  7. HTML5数据存储
  8. Mysql 计算时间间隔函数
  9. 理解ROS的节点(NODE)
  10. 用shape画内圆外方,形成一个圆形头像
  11. js关联数组
  12. tensorflow 经典教程及案例
  13. 什么是 Message Queue
  14. vue项目打包问题
  15. zombodb 索引管理
  16. C#小技巧
  17. 架构师速成7.3-devops为什么非常重要
  18. JQuery中serialize()、serializeArray()和param()用法举例
  19. Ubuntu共享WiFi(AP)给Android方法
  20. 034——VUE中表单控件处理之使用vue控制radio表单的实例操作

热门文章

  1. 并查集:HDU4496-D-City(倒用并查集)
  2. OpenCV学习笔记(二) cv::Mat
  3. 介绍 Active Directory 域服务 (AD DS) 虚拟化
  4. manjaro无声音
  5. html编码和解码
  6. 冒泡排序(Bubble Sort)及优化
  7. cmake导出的visual studio工程带头文件
  8. [kuangbin带你飞]专题十一 网络流个人题解(L题留坑)
  9. [POJ3352]Road Construction
  10. [SDOI2016][bzoj4514] 数字配对 [费用流]