当前位置:网站首页>1005: estimation of the earth's population carrying capacity
1005: estimation of the earth's population carrying capacity
2022-06-12 13:23:00 【Xiao Liu wants to be number one】
1005: Estimation of the earth's population carrying capacity
The time limit : 1000 ms Memory limit : 65536 KB
Submission number : 98483 Passing number : 55255
【 Title Description 】
Suppose that the new resources on the earth increase at a constant rate . According to this calculation , The earth's existing resources plus new resources are available for xx Billion people live aa year , Or for yy Billion people live bb year .
In order to achieve sustainable development , Avoid resource depletion , How many billion people can the earth feed at most ?
【 Input 】
a line , Including four positive integers x,a,y,bx,a,y,b, Two integers are separated by a single space .x>y,a<b,ax<byx>y,a<b,ax<by, Each integer is not greater than 1000010000.
【 Output 】
A real number zz, It means that the earth supports... At most zz Hundreds of millions of people , Round to two decimal places .
【 sample input 】
110 90 90 210
【 sample output 】
75.00
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int x, a, y, b;
double z;
cin >> x >> a >> y >> b;
z = ( y * b- x * a) / (b - a);
cout << setiosflags(ios::fixed) << setprecision(2) << z;
return 0;
}边栏推荐
- Overview of embedded system 1- definition, characteristics and development history of embedded system
- How to balance multiple losses in deep learning?
- R language Visual facet chart, hypothesis test, multivariable grouping t-test, visual multivariable grouping faceting bar plot, adding significance level and jitter points
- 章鱼网络进展月报 | 2022.5.1-5.31
- Hudi key generation
- How to adapt the page size when iframe is embedded in a web page
- 创新实训(十)高级界面美化
- 【微信小程序开发】第1篇:开发工具安装及程序配置
- Automatic Generation of Visual-Textual Presentation Layout
- 【刷题篇】超级洗衣机
猜你喜欢

嵌入式系统概述1-嵌入式系统定义、特点和发展历程

Share PDF HD version, series

What is the function tag? Article to understand its role and its best practices

看完这一篇就够了,web中文开发

Application of list and Dict

单向环形链表实现约瑟夫环

Multi source BFS problem template (with questions)

嵌入式系统硬件构成-基于ARM的嵌入式开发板介绍

torch_ geometric message passing network

Source of routing information
随机推荐
unittest框架
Structure matérielle du système embarqué - introduction du Conseil de développement embarqué basé sur arm
What if the MySQL installation on the apple computer is completed and cannot be found
R language Visual facet chart, hypothesis test, multivariable grouping t-test, visual multivariable grouping faceting bar plot, adding significance level and jitter points
verilog-mode的简要介绍
Overview of embedded system 2- composition and application of embedded system
import torch_ Data view of geometric
Script import CDN link prompt net:: err_ FILE_ NOT_ Found problem
Hudi key generation
hudi 键的生成(Key Generation)
Application of list and Dict
How to solve the problem of data table query error when SQLite writes the registration function?
Help you with everything from the basics to the source code. Introduce the technology in detail
Stm32f1 and stm32cubeide programming examples - device driver -eeprom-at24c256 driver
【刷题篇】抽牌获胜的概率
About paiwen
JVM 运行时参数
442 authors, 100 pages! It took Google 2 years to release the new benchmark big bench | open source
torch_geometric message passing network
B站分布式KV存储混沌工程实践