转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1309072514

 

额。。还真怀念。。这都遇上了。。2011年5月ACM珠海赛的试机题= =

别问我怎么做,求平均数而已,水过水过。。。

毫无悬念,当时题目都没看,一看到Sample Input和Sample Output就直接A了= =

 

 1 //Memory Time 
2 //256K 0MS
3
4 #include<iostream>
5 #include<iomanip>
6 using namespace std;
7
8 int main(void)
9 {
10 double sum=0.0;
11 for(int i=1;i<=12;i++)
12 {
13 double temp;
14 cin>>temp;
15 sum+=temp;
16 }
17 cout<<fixed<<setprecision(2)<<'$'<<sum/12.0<<endl;
18 return 0;
19 }

相关文章:

  • 2021-11-10
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2021-06-09
  • 2021-11-16
  • 2021-06-05
  • 2021-12-07
相关资源
相似解决方案