Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
129653 薛承谦 计算平均数 C++ Accepted 1 MS 272 KB 362 2025-09-01 15:20:36

Tests(10/10):


Code:

#include<iostream> #include<algorithm> #include<cstring> #include<bits/stdc++.h> using namespace std; int main(){ //初始化 int a[5]; float b=0; //输入 for(int i=0;i<5;i++){ cin>>a[i]; b=b+a[i]; } b=b/5; //输出+计算 printf("%.2f\n",b); for(int i=0;i<5;i++){ if(a[i]>b){ cout<<a[i]<<" "; } } return 0; }