#33515: ○( ^皿^)っ Hehehe…○( ^皿^)っ Hehehe…○( ^皿^)っ Hehehe…


yp11151230@yphs.tp.edu.tw (909-42蔡亞儒)

學校 : 臺北市私立延平高級中學
編號 : 197211
來源 : [150.129.72.232]
最後登入時間 :
2025-07-09 18:05:16

#include <iostream>
#include <iomanip>
using namespace std;
int main() {
  int  t;
  cin >> t;
  for(int i=1; i<=t; i++) {
    double sum=0;
    int n;   cin >> n;
    for(int j=1; j<=n; j++) {
      int p;  cin >> p;
      sum+=p;
      }
    double ave=sum/n;
    cout << fixed << setprecision(2) <<ave << endl;
  
    }
}

#33518: Re: ○( ^皿^)っ Hehehe…○( ^皿^)っ Hehehe…○( ^皿^)っ Hehehe…


yp11151230@yphs.tp.edu.tw (909-42蔡亞儒)

學校 : 臺北市私立延平高級中學
編號 : 197211
來源 : [150.129.72.232]
最後登入時間 :
2025-07-09 18:05:16

#include
#include
using namespace std;
int main() {
  int  t;
  cin >> t;
  for(int i=1; i<=t; i++) {
    double sum=0;
    int n;   cin >> n;
    for(int j=1; j<=n; j++) {
      int p;  cin >> p;
      sum+=p;
      }
    double ave=sum/n;
    cout << fixed << setprecision(2) <  
    }
}