A. Straight «A»
来源:互联网 发布:高新区山东广电网络 编辑:程序博客网 时间:2024/05/21 08:44
解题说明:水题,按照题目要求进行判断即可。
#include<cstdio>#include<algorithm>#include<cstring>#include<cstdlib>#include<iostream>using namespace std;int n,k,x,a;int main(){scanf("%d%d",&n,&k);int temp=0; float sum=0;while(temp<n){scanf("%d",&x);sum=sum+x;temp++;}a=(n*(k-0.5)-sum)*2;if(a>=0){printf("%d\n",a);}else{printf("0\n");}return 0;}
阅读全文
0 0
- A. Straight «A»
- 【Codeforces 808 A. Straight «A»】
- CodeFroces 810A Straight «A»
- codeforces 810A Straight «A»
- 810A. Straight «A»
- Codeforces 810A Straight «A» 题解
- Codeforces Round #415 (Div. 2) A. Straight «A»
- Codeforces Round #415 (Div. 2) A. Straight «A»
- 0526 CF#801A&G2n#D-Straight «A»
- Codeforces Round #415 (Div. 2)A. Straight «A» (暴力)
- codeforces——810A——Straight «A»
- CodeForces 810A——Straight «A» ——二分
- Codeforces Round #415 A Straight <<A>>
- CodeForces 810A Straight <<A>> 【数学】【模拟】
- codeforces 810A Straight <<A>> 暴力
- Programming VIM/vSphere SDK with a straight way
- 2014 ACM 吉林省赛 A 题 The Longest Straight
- 74. A straight foot is not afraid of crooked shoe. 身正不怕影子斜
- 技术讨论qq群:634383854
- 剑指offer面试题[7]-用两个栈实现队列
- markdown
- Leetcode 39. Combination Sum
- 【java知识点异常】throw new RuntimeException(e)与e.printStackTrace( )的区别
- A. Straight «A»
- Hello CSDN
- 2017/6/22
- greenDAO文档翻译之四:会话
- HTTP相关
- 二维图形的矩阵变换(一)——基本概念
- 市面上常用的网络通讯技术
- 记第一次写博客
- VR系列——Oculus Rift 开发者指南:六、Oculus触控