8th Blue Bridge cup pressure calculation (code + details), 8th Blue Bridge

Source: Internet
Author: User

8th Blue Bridge cup pressure calculation (code + details), 8th Blue Bridge

Pressure Calculation

 

Title: a batch of precious metal raw materials are neatly piled up in the high-tech Laboratory of the computation Planet X. Each metal material has the same shape and size, but different weights. Metal Materials are strictly stacked in a pyramid shape. 7 5 8 7 8 8 9 2 2 8 1 4 9 1 8 8 8 8 4 1 7 9 6 1 4 5 5 6 5 6 9 5 5 5 5 4 7 9 3 5 5 1 7 5 7 9 7 4 3 3 1 4 6 5 5 8 8 3 2 4 3 1 3 3 1 6 6 5 5 4 4 2 9 9 9 2 1 9 1 9 2 9 5 7 9 4 3 3 7 7 9 3 6 1 3 8 8 3 7 3 6 8 1 5 3 9 5 8 3 8 1 3 3 8 3 2 3 3 5 5 5 4 2 8 6 7 6 9 8 1 8 1 8 4 4 6 2 2 1 9 4 2 3 3 4 2 8 4 2 2 9 9 2 8 3 4 9 6 3 9 4 6 9 7 9 7 4 9 7 6 6 2 8 9 4 1 8 1 1 7 2 6 9 2 8 6 4 2 7 9 5 4 1 2 5 1 7 3 9 8 3 3 5 2 1 6 7 9 3 2 8 9 5 5 6 6 6 2 1 8 7 9 6 7 1 8 8 7 5 3 6 5 4 7 3 4 6 7 8 1 3 2 7 4 2 6 3 5 3 4 9 2 4 5 7 6 3 2 2 2 2 4 8 5 5 4 7 4 4 5 8 3 3 8 1 8 6 3 2 1 6 2 6 4 6 3 8 2 9 6 1 2 4 3 5 3 4 9 6 3 8 6 5 9 1 5 3 3 2 6 8 8 5 3 2 2 7 9 3 3 2 8 6 9 8 4 4 9 5 8 2 6 3 4 4 4 9 3 8 8 8 7 7 9 7 5 2 2 7 9 2 5 1 9 2 6 5 3 5 7 3 5 4 2 8 9 7 6 6 6 8 7 5 5 8 2 4 7 4 7 7 2 6 9 2 1 8 2 9 8 5 7 3 6 5 4 5 5 5 5 5 6 3 5 3 9 5 8 9 5 4 1 2 6 1 4 3 5 3 2 4 1 X X the number represents the weight of the metal block (unit of measurement is large ). The bottom layer X represents 30 extremely high precision electronic scales. Assume that the weight of each raw material falls on the two metal blocks at the bottom very accurately. Finally, the weight of all the metal blocks falls evenly among the bottom-layer electronic scales. The unit of measurement of an electronic scale is small, so the number displayed is large. The staff found that the number of electronic scales with the smallest reading is 2086458231. How many electronic scales with the largest reading is calculated? Note: You must submit an integer and do not enter any additional content.

 

This question changes the data format:

75 87 8 89 2 7 28 1 4 9 18 1 8 8 4 17 9 6 1 4 5 45 6 5 5 6 9 5 65 5 4 7 9 3 5 5 17 5 7 9 7 4 7 3 3 14 6 4 5 5 8 8 3 2 4 31 1 3 3 1 6 6 5 5 4 4 29 9 9 2 1 9 1 9 2 9 5 7 94 3 3 7 7 9 3 6 1 3 8 8 3 73 6 8 1 5 3 9 5 8 3 8 1 8 3 38 3 2 3 3 5 5 8 5 4 2 8 6 7 6 98 1 8 1 8 4 6 2 2 1 7 9 4 2 3 3 42 8 4 2 2 9 9 2 8 3 4 9 6 3 9 4 6 97 9 7 4 9 7 6 6 2 8 9 4 1 8 1 7 2 1 69 2 8 6 4 2 7 9 5 4 1 2 5 1 7 3 9 8 3 35 2 1 6 7 9 3 2 8 9 5 5 6 6 6 2 1 8 7 9 96 7 1 8 8 7 5 3 6 5 4 7 3 4 6 7 8 1 3 2 7 42 2 6 3 5 3 4 9 2 4 5 7 6 6 3 2 7 2 4 8 5 5 47 4 4 5 8 3 3 8 1 8 6 3 2 1 6 2 6 4 6 3 8 2 9 61 2 4 1 3 3 5 3 4 9 6 3 8 6 5 9 1 5 3 2 6 8 8 5 32 2 7 9 3 3 2 8 6 9 8 4 4 9 5 8 2 6 3 4 8 4 9 3 8 87 7 7 9 7 5 2 7 9 2 5 1 9 2 6 5 3 9 3 5 7 3 5 4 2 8 97 7 6 6 8 7 5 5 8 2 4 7 7 4 7 2 6 9 2 1 8 2 9 8 5 7 3 65 9 4 5 5 7 5 5 6 3 5 3 9 5 8 9 5 4 1 2 6 1 4 3 5 3 2 4 1X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X

 

After this processing, you can use a [I + 1] [j] + = a [I] [j]/2; a [I + 1] [j + 1] + = a [I] [j]; for calculation:

The Code is as follows:

 1 #include<stdio.h> 2 #include<string.h> 3 #include<ctype.h> 4 #include<math.h> 5  6 int main () 7 { 8     double line[60][60]; 9     double n,m;10     int i,j;11     memset(line,0,sizeof(line));12     for(i=1;i<=29;i++){13         for(j=1;j<=i;j++){14             scanf("%lf",&line[i][j]);15         }16     }17     for(i=1;i<=29;i++){18         for(j=1;j<=i;j++){19             line[i+1][j]+=line[i][j]/2;20             line[i+1][j+1]+=line[i][j]/2;21         }22     }23     /*for(i=1;i<=30;i++){24         for(j=1;j<=i;j++){25             printf("%.2lf ",line[i][j]);26         }27         printf("\n");28     }*/29     n=m=line[30][1];30     for(i=1;i<=30;i++){31         if(n<line[30][i])32             n=line[30][i];33         if(m>line[30][i])34             m=line[30][i];35     }36     printf("n=m== %lf %lf\n",n,m);37     printf("%lf\n",n*2086458231/m);38     return 0;39 }

Final Result: 72665192664

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.