当前位置:网站首页>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);
}
}
}
}
边栏推荐
- Azure ad domain service (II) configure azure file share disk sharing for machines in the domain service
- Use Alibaba cloud NPM image acceleration
- [Chongqing Guangdong education] National Open University spring 2019 455 logistics practice reference questions
- awk从入门到入土(12)awk也可以写脚本,替代shell
- DM8 command line installation and database creation
- How to solve the problem of computer jam and slow down
- Codeforces Round #803 (Div. 2)(A-D)
- es6总结
- Redis sentinel mechanism
- Codeforces Round #750 (Div. 2)(A,B,C,D,F1)
猜你喜欢
SSRF vulnerability exploitation - attack redis
AcWing 244. Enigmatic cow (tree array + binary search)
09 softmax regression + loss function
Manjaro install wechat
Educational Codeforces Round 119 (Rated for Div. 2)
Mouse over to change the transparency of web page image
awk从入门到入土(12)awk也可以写脚本,替代shell
How to choose solid state hard disk and mechanical hard disk in computer
The second session of the question swiping and punching activity -- solving the switching problem with recursion as the background (I)
Codeforces Global Round 21(A-E)
随机推荐
Educational Codeforces Round 115 (Rated for Div. 2)
Guanghetong's high-performance 4g/5g wireless module solution comprehensively promotes an efficient and low-carbon smart grid
Awk from getting started to digging in (9) circular statement
How to solve the problem of computer jam and slow down
The map set type is stored in the form of key value pairs, and the iterative traversal is faster than the list set
C # implements a queue in which everything can be sorted
awk从入门到入土(4)用户自定义变量
Group programming ladder race - exercise set l1-006 continuity factor
yolov5 xml数据集转换为VOC数据集
snipaste 方便的截图软件,可以复制在屏幕上
09 softmax regression + loss function
一文了解数据异常值检测方法
Codeforces Global Round 21(A-E)
1211 or chicken and rabbit in the same cage
How to play dapr without kubernetes?
Use preg_ Match extracts the string into the array between: & | people PHP
C#实现一个万物皆可排序的队列
PHP converts seconds to timestamps - PHP
The second session of the question swiping and punching activity -- solving the switching problem with recursion as the background (I)
How to re enable local connection when the network of laptop is disabled