17 blue bridge C language B group 3. Pressure bearing calculation

Title: pressure calculation In the high-tech laboratory of Planet X, some precious metal materials are stacked neatly. The shape and size of each met...

Title: pressure calculation

In the high-tech laboratory of Planet X, some precious metal materials are stacked neatly.

The shape and size of each metal material are identical, but the weight is different.
Metal materials are strictly stacked in a pyramid.

7 5 8 7 8 8 9 2 7 2 8 1 4 9 1 8 1 8 8 4 1 7 9 6 1 4 5 4 5 6 5 5 6 9 5 6 5 5 4 7 9 3 5 5 1 7 5 7 9 7 4 7 3 3 1 4 6 4 5 5 8 8 3 2 4 3 1 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 8 3 3 8 3 2 3 3 5 5 8 5 4 2 8 6 7 6 9 8 1 8 1 8 4 6 2 2 1 7 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 7 2 1 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 9 6 7 1 8 8 7 5 3 6 5 4 7 3 4 6 7 8 1 3 2 7 4 2 2 6 3 5 3 4 9 2 4 5 7 6 6 3 2 7 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 1 3 3 5 3 4 9 6 3 8 6 5 9 1 5 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 8 4 9 3 8 8 7 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 9 7 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 6 5 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 1 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 X

The figures represent the weight of the metal block (larger unit of measurement).
The X at the bottom represents 30 electronic scales with high precision.

Suppose that the weight of each piece of raw material falls exactly on the two metal blocks below,
Finally, the weight of all the metal blocks is strictly and accurately distributed on the bottom electronic scale.
The unit of measurement of the scale is very small, so the number displayed is very large.

The staff found that the number of scales with the smallest reading was 2086458231

Please figure out: what is the indication of the electronic scale with the largest reading?

Note: you need to submit an integer. Do not fill in any extra content.

-----------------------

From post update

Answer: 72665192664

#include<iostream> #include<cstdio> using namespace std; int t[100]; double a[100]; int main() { for(int i=1;i<30;i++) { for(int j=1;j<=i;j++) { scanf("%d",&t[j]); } for(int j=i;j>0;j--)//From post update { a[j]=(a[j]+a[j-1])/2+t[j]; } } double minn=a[1]; double maxx=a[1]; for(int j=30;j>0;j--) { a[j]=(a[j]+a[j-1])/2; if(a[j]>maxx) { maxx=a[j]; } if(a[j]<minn) { minn=a[j]; } } printf("%f",2086458231.0/minn*maxx); return 0; }

4 December 2019, 02:52 | Views: 1590

Add new comment

For adding a comment, please log in
or create account

0 comments