Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
52729 yuboyuan 求平均年龄 C++ Wrong Answer 0 MS 248 KB 311 2024-10-12 20:56:33

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int main() { int n,x,s,i=1; bool a=1; cin>>n; while(i<=n) { cin>>x; a=a&&(x>=15)&&(x<=25); s+=x; i++; } if(a) { cout<<fixed<<setprecision(2)<<(float)s/n; } return 0; }


Judgement Protocol: