当前位置:网站首页>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);
}
}
}
}
边栏推荐
- awk从入门到入土(9)循环语句
- std::is_ union,std::is_ class,std::integral_ constant
- Conversion of yolov5 XML dataset to VOC dataset
- MySQL relearn 1-centos install mysql5.7
- How to play dapr without kubernetes?
- Add log file to slim frame - PHP
- Codeforces Round #803 (Div. 2)(A-D)
- Redis sentinel mechanism
- How to send pictures to the server in the form of file stream through the upload control of antd
- Leetcode topic [array] -136- numbers that appear only once
猜你喜欢

snipaste 方便的截图软件,可以复制在屏幕上

Fault analysis | MySQL: unique key constraint failure

OpenFeign 服务接口调用

How to play dapr without kubernetes?

小程序容器技术与物联网 IoT 可以碰撞出什么样的火花

es6总结

How college students choose suitable computers

Display Chinese characters according to numbers

微服务入门:Gateway网关

What should I do if there is a problem with the graphics card screen on the computer
随机推荐
Flutter integrated amap_ flutter_ location
deno debugger
High order phase difference such as smear caused by myopic surgery
The basic syntax of mermaid in typera
How to solve the problem that computers often flash
Awk from entry to earth (7) conditional statements
How to play dapr without kubernetes?
Awk from entry to earth (8) array
awk从入门到入土(9)循环语句
System disk expansion in virtual machine
团体程序设计天梯赛-练习集 L2-002 链表去重
【无标题】转发最小二乘法
Newh3c - network address translation (NAT)
If the array values match each other, shuffle again - PHP
The second session of the question swiping and punching activity -- solving the switching problem with recursion as the background (I)
团体程序设计天梯赛-练习集 L1-006 连续因子
Technology sharing | MySQL parallel DDL
Comprendre la méthode de détection des valeurs aberrantes des données
Redis sentinel mechanism
Horizon sunrise X3 PI (I) first boot details