1 solutions
-
0
#include <bits/stdc++.h> using namespace std; int main() { int x; double sum=0,num=0; for(int i=1;i<=9999999;i++) { cin >> x; if(x==0) { break; } sum+=x; num++; } cout << fixed << setprecision(1); cout << sum/num << " "; sum=0; num=0; for(int i=1;i<=9999999;i++) { cin >> x; if(x==0) { break; } sum+=x; num++; } cout << fixed << setprecision(1); cout << sum/num; }
- 1
Information
- ID
- 656
- Time
- 1000ms
- Memory
- 16MiB
- Difficulty
- 10
- Tags
- # Submissions
- 4
- Accepted
- 3
- Uploaded By