L - Demacia of the Ancients——ZOJ
来源:互联网 发布:电脑桌面壁纸 知乎 编辑:程序博客网 时间:2024/04/28 04:16
Description
There is a popular multiplayer online battle arena game called Demacia of the Ancients. There are lots of professional teams playing this game. A team will be approved as Level K if there are exact K team members whose match making ranking (MMR) is strictly greater than 6000.
You are given a list of teams. Please calculate the level of each team.
Input
There are multiple test cases. The first line of input contains an integer T indicating the number of test cases. For each test case:
The first line contains an integer N (1 <= N <= 10) indicating the number of team members.
The second line contains N integers representing the MMR of each team member. All MMRs are non-negative integers less than or equal to 9999.
Output
For each test case, output the level of the given team.
Sample Input
357986 6984 6645 6200 615057401 7377 6900 6000 43003800 600 200
Sample Output
530
#include<stdio.h>#include<string.h>int main(){int t,level,a[100],n;scanf("%d",&t);while(t--){level=0;memset(a,0,sizeof(a));scanf("%d",&n);for(int i=0;i<n;i++){scanf("%d",&a[i]);if(a[i]>6000)level++;}printf("%d\n",level);} return 0; }
- L - Demacia of the Ancients——ZOJ
- zoj 3880 Demacia of the Ancients
- ZOJ 3880 Demacia of the Ancients
- ZOJ 3880 Demacia of the Ancients
- zoj-3880-Demacia of the Ancients
- ZOJ 3880-Demacia of the Ancients【模拟】
- zoj-3880-Demacia of the Ancients
- Demacia of the Ancients
- ACM刷题之ZOJ————Demacia of the Ancients
- ZOJ Problem Set - 3880||Demacia of the Ancients
- ZOJ - 3880 Demacia of the Ancients (水)
- ACM-水题 Demacia of the Ancients
- ZOJ3880:Demacia of the Ancients(浙江省赛2015)
- 第十二届浙江省大学生程序设计大赛-Demacia of the Ancients
- ZOJ3880 Demacia of the Ancients【序列处理+水题】
- zoj3869 Ace of Aces && zoj3880 Demacia of the Ancients(水)
- 12th浙江省省赛 Demacia of the Ancients(水)
- Mystery of the Ancients Curse of the Black Water Collectors Edition v1 01-TE
- html5<canvas>画图
- Spring中property-placeholder注解说明
- PAT中1001.害死人不偿命的(3n+1)猜想 (15)
- iOS UIViewContentMode各类型效果
- 图的邻接矩阵表示方法以及遍历
- L - Demacia of the Ancients——ZOJ
- ORACLE用SYS登录报ORA-28009:connection as SYS should be as SYSDBA OR SYSOPER解决方法
- Spring DI[依赖注入]
- java基础学习(4)
- 剑指offer之面试题4替换空格
- 1005
- 聊聊Condition
- oracle赋权
- SQL中数据库的基本操作