当前位置:网站首页>There are 100 people eating 100 apples, one adult eating 4 apples, and four children eating 1 apple. How can they eat exactly 100 apples? Use any high-level language you are familiar with
There are 100 people eating 100 apples, one adult eating 4 apples, and four children eating 1 apple. How can they eat exactly 100 apples? Use any high-level language you are familiar with
2022-07-04 08:47:00 【,, country】
public static void main(String[] args) {
for(int i=1; i<=100; i++)
{
for(int j=1; j<=400; j++)
{
if( (i * 4) + (j*0.25) == 100 && i+j==100 )
{
System.out.println(i + "=======" + j);
}
}
}
}
边栏推荐
- What if the wireless network connection of the laptop is unavailable
- 广和通高性能4G/5G无线模组解决方案全面推动高效、低碳智能电网
- awk从入门到入土(7)条件语句
- Use preg_ Match extracts the string into the array between: & | people PHP
- Awk from entry to earth (12) awk can also write scripts to replace the shell
- Industry depression has the advantages of industry depression
- 1211 or chicken and rabbit in the same cage
- 4 small ways to make your Tiktok video clearer
- Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources
- Leetcode topic [array] - 121 - the best time to buy and sell stocks
猜你喜欢
DM8 database recovery based on point in time
What if I forget the router password
FOC控制
C语言-入门-基础-语法-[变量,常亮,作用域](五)
User login function: simple but difficult
Relationship and operation of random events
What should I do if there is a problem with the graphics card screen on the computer
Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources
How to choose solid state hard disk and mechanical hard disk in computer
Comparison between sentinel and hystrix
随机推荐
Go zero micro service practical series (IX. ultimate optimization of seckill performance)
[CV] Wu Enda machine learning course notes | Chapter 9
@Role of pathvariable annotation
go-zero微服务实战系列(九、极致优化秒杀性能)
manjaro安装微信
A method for detecting outliers of data
How to re enable local connection when the network of laptop is disabled
High order phase difference such as smear caused by myopic surgery
2022 examination questions for safety managers of metal and nonmetal mines (underground mines) and examination papers for safety managers of metal and nonmetal mines (underground mines)
2022 electrician (intermediate) examination question bank and electrician (intermediate) examination questions and analysis
How to choose solid state hard disk and mechanical hard disk in computer
SSRF vulnerability exploitation - attack redis
Mouse over to change the transparency of web page image
2022 gas examination registration and free gas examination questions
Awk from entry to earth (8) array
Manjaro install wechat
A single element in an ordered array
What should I do if there is a problem with the graphics card screen on the computer
The basic syntax of mermaid in typera
DM8 database recovery based on point in time