Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(){
- double gpx = 0., hx = 0.;
- double g, h;
- while(~scanf("%lf%lf", &g, &h)){
- hx += h;
- if(g >= 60.){
- gpx += (4 - 3. * (100. - g) * (100. - g) / 1600.) * h;
- }
- }
- printf("%.2f\n", gpx / hx);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment