【Codeforces Round #451 (Div. 2) A】Rounding
【链接】 我是链接,点我呀:)
【题意】
在这里输入题意
【题解】
模拟
【代码】
/*
1.Shoud it use long long ?
2.Have you ever test several sample(at least therr) yourself?
3.Can you promise that the solution is right? At least,the main ideal
4.use the puts("") or putchar() or printf and such things?
5.init the used array or any value?
6.use error MAX_VALUE?
7.use scanf instead of cin/cout?
8.whatch out the detail input require
*/
#include <bits/stdc++.h>
using namespace std;
int n;
int main(){
#ifdef LOCAL_DEFINE
freopen("rush_in.txt", "r", stdin);
#endif
ios::sync_with_stdio(0),cin.tie(0);
cin >> n;
int x = n%10;
if (x < 5){
n = n-x;
}else{
n = n-x + 10;
}
cout << n << endl;
return 0;
}
【Codeforces Round #451 (Div. 2) A】Rounding的更多相关文章
- 【Codeforces Round #451 (Div. 2) B】Proper Nutrition
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 可以直接一层循环枚举. 也可以像我这样用一个数组来存y*b有哪些. 当然.感觉这样做写麻烦了.. [代码] /* 1.Shoud i ...
- 【Codeforces Round #451 (Div. 2) C】Phone Numbers
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 用map<string,vector > dic;模拟就好. 后缀.翻转一下就变成前缀了. 两重循环剔除这种情况不输出就 ...
- 【Codeforces Round #451 (Div. 2) D】Alarm Clock
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 尺取法+二分. 类似滑动窗口. 即左端点为l,右端点为r. 维护a[r]-a[l]+1总是小于等于m的就好. (大于m就右移左端点) ...
- 【Codeforces Round #432 (Div. 1) B】Arpa and a list of numbers
[链接]h在这里写链接 [题意] 定义bad list是一个非空的.最大公约数为1的序列.给定一个序列,有两种操作:花费x将一个元素删除.花费y将一个元素加1,问你将这个序列变为good list所需 ...
- 【Codeforces Round #420 (Div. 2) C】Okabe and Boxes
[题目链接]:http://codeforces.com/contest/821/problem/C [题意] 给你2*n个操作; 包括把1..n中的某一个数压入栈顶,以及把栈顶元素弹出; 保证压入和 ...
- 【Codeforces Round #420 (Div. 2) B】Okabe and Banana Trees
[题目链接]:http://codeforces.com/contest/821/problem/B [题意] 当(x,y)这个坐标中,x和y都为整数的时候; 这个坐标上会有x+y根香蕉; 然后给你一 ...
- 【Codeforces Round #420 (Div. 2) A】Okabe and Future Gadget Laboratory
[题目链接]:http://codeforces.com/contest/821/problem/A [题意] 给你一个n*n的数组; 然后问你,是不是每个位置(x,y); 都能找到一个同一行的元素q ...
- 【Codeforces Round #423 (Div. 2) C】String Reconstruction
[Link]:http://codeforces.com/contest/828/problem/C [Description] 让你猜一个字符串原来是什么; 你知道这个字符串的n个子串; 且知道第i ...
- 【Codeforces Round #423 (Div. 2) B】Black Square
[Link]:http://codeforces.com/contest/828/problem/B [Description] 给你一个n*m的格子; 里面包含B和W两种颜色的格子; 让你在这个格子 ...
随机推荐
- Azure 配置高可用的准备系列工作-建立不同区域的存储账户和建立网络!
我们谈到我们的业务,常常谈到一个词.三层架构,就是我们的UI层.数据訪问层和数据存储层的分离,通常情况下我们的业务高可用必须满足这三层的所有高可用的情况下才干达到最高级别的高可用. 那么谈到Az ...
- 128.C++文件操作小结
打开后缀参数 #include <fstream> #include <iostream> using namespace std; //文本读写 //文件写入 void ma ...
- 16.C语言可变参数
//可变参数实现多个参数求和 1 #define _CRT_SECURE_NO_WARNINGS #include <stdlib.h> #include <stdio.h> ...
- 24.桌面移动qq
#include <stdlib.h> #include <Windows.h> #include <stdio.h> #include <math.h> ...
- KDD 2011 最佳工业论文中机器学习的实践方法-翻译
作者:黄永刚 Practical machine learning tricks from the KDD 2011 best industry paper 原文链接:http://blog.davi ...
- BFS(广度优先搜索)
Catch That Cow Farmer John has been informed of the location of a fugitive cow and wants to catch he ...
- IDEA设置注释模板最佳实践
效果 在方法上输入/**,然后按tab键,生成的效果如下 配置步骤 1. 在Live Templates中添加模板组,命名随意,主要是为了存放自定义的模板,方便管理 2. 在模板组下添加一个模板,具体 ...
- SQL解析XML文件
DECLARE @idoc int DECLARE @doc varchar(max) SET @doc ='<?xml version="1.0" encoding=&qu ...
- ZOJ 3175 Number of Containers 分块
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3216 乱搞的...watashi是分块做的...但我并不知道什么是分块...大 ...
- Vue数据驱动表单渲染,轻松搞定form表单
form-create 具有动态渲染.数据收集.校验和提交功能的表单生成器,支持双向数据绑定.事件扩展以及自定义组件,可快速生成包含有省市区三级联动.时间选择.日期选择等17种功能组件. Github ...