1001 求平均年龄
来源:互联网 发布:发现网络存在问题 编辑:程序博客网 时间:2024/06/10 18:09
求平均年龄
Time Limit:1000MS Memory Limit:65536K
Total Submit:536 Accepted:311
Description
班上有学生若干名,给出每名学生的年龄(整数),求班上所有学生的平均年龄,保留到小数点后两位。
Input
第一行有一个整数n(1≤n≤100),表示学生的人数。其后n行每行有1个整数,取值为15到25。
Output
输出一行,该行包含一个浮点数,为要求的平均年龄,保留到小数点后两位。
Sample Input
21817
Sample Output
17.50
Sample Result:
Source
POJ:2714
C
main(){ int n,a=0,b,c; scanf("%d",&n); c=n; while(n){ scanf("%d",&b); a+=b; n--; } printf("%.2f",(float)a/c);}
0 0
- 1001 求平均年龄
- 01:求平均年龄
- 01:求平均年龄
- 1. 求平均年龄
- ACM java求平均年龄
- 题目1128:求平均年龄
- 题目1128:求平均年龄
- 题目1128:求平均年龄
- 题目1128:求平均年龄
- POJ 2714:求平均年龄
- 题目1128:求平均年龄
- 题目1128:求平均年龄
- Problem A: 求平均年龄
- Problem A: 求平均年龄
- Problem B: 求平均年龄
- Problem A: 求平均年龄
- 百练 2714 求平均年龄
- poj 百练 2714:求平均年龄
- POJ 3252- Round Numbers(求区间中二进制数中0个数大于1的数的总数)
- solr查询语法(solr query)
- Hibernate EntityManager
- OC中的description方法
- ACM-整除个数
- 1001 求平均年龄
- mongodb3.0.3 添加认证用户和密码
- jForum版块增加公共的还是私的属性方法:
- 常见的ETL工具-知多少
- 使用msword.olb操作word(5)
- maven dependency中scope=compile 和 provided区别
- ACM-I'll play a trick on you
- 嵌入式的我们应该学习哪些电子知识
- 指尖上的艺术——《黑客与画家》