fork download
  1. /*
  2. ID: y1197771
  3. PROG: test
  4. LANG: C++
  5. */
  6. #include<bits/stdc++.h>
  7. #define pb push_back
  8. #define FOR(i, n) for (int i = 0; i < (int)n; ++i)
  9. #define dbg(x) cout << #x << " at line " << __LINE__ << " is: " << x << endl
  10. typedef long long ll;
  11. using namespace std;
  12. typedef pair<int, int> pii;
  13. const int maxn = 1e3 + 10;
  14. void solve() {
  15. int t, n, w;
  16. double s = 0;
  17. cin >> t >> n >> w;
  18. double task; int p;
  19. for (int i = 0; i < t; i++) {
  20. cin >> task >> p;
  21. s += task * (100 - p) / 100;
  22. }
  23. printf("%.2f\n", s / w);
  24. }
  25. int main() {
  26. //freopen("test.in", "r", stdin);
  27. //freopen("test.out", "w", stdout);
  28. solve();
  29. return 0;
  30. }
  31.  
Success #stdin #stdout 0s 3472KB
stdin
6 3 90
100 90
40.40 70
60.30 70
40.40 80
40.40 85
40.40 88
stdout
0.66