当前位置:网站首页>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;
}边栏推荐
- import torch_ Geometric first graph network example
- 基于华为云鲲鹏弹性云服务器ECS部署openGauss数据库【这次高斯不是数学家】
- Redis消息队列重复消费问题
- 【VIM】. Vimrc configuration, vundle and youcompleteme have been installed
- Chaotic engineering practice of distributed kV storage in station B
- 嵌入式系统概述2-嵌入式系统组成和应用
- Deploy opengauss database based on Huawei cloud Kunpeng elastic ECS [Gauss is not a mathematician this time]
- RK3399平台开发系列讲解(内核调试篇)2.50、systrace的使用
- 入门深度学习与机器学习的经验和学习路径
- 嵌入式系统概述1-嵌入式系统定义、特点和发展历程
猜你喜欢
随机推荐
import torch_geometric 的Data 查看
Microsoft Word tutorial, how to insert a header or footer in word?
STM32F1与STM32CubeIDE编程实例-设备驱动-EEPROM-AT24C256驱动
The goods are full. You must take this knowledge
2022 ARTS|Week 23
VGA display color bar and picture (FPGA)
R language ggplot2 visualization: use the ggrep package to add a number label to the data point at the end of the line plot
Hardware composition of embedded system - introduction of embedded development board based on ARM
简历 NFT 平台 TrustRecruit 加入章鱼网络成为候选应用链
嵌入式系统概述2-嵌入式系统组成和应用
[brush title] probability of winning a draw
Further understanding of the network
达梦数据库DM8 windows环境安装
The problem of Joseph in Informatics
leetcode 47. Permutations II 全排列 II(中等)
实战 | 巧用位姿解算实现单目相机测距
Hudi key generation
Getting to know blob objects
torch_geometric message passing network
C#DBHelper_ FactoryDB_ GetConn








