当前位置:网站首页>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);
}
}
}
}
边栏推荐
- Webapi interview question summary 01
- Conversion of yolov5 XML dataset to VOC dataset
- 一文了解數據异常值檢測方法
- 2022 tower crane driver examination and tower crane driver examination questions and analysis
- Flutter integrated amap_ flutter_ location
- DM database password policy and login restriction settings
- From scratch, use Jenkins to build and publish pipeline pipeline project
- Codeforces Round #803 (Div. 2)(A-D)
- 随机事件的关系与运算
- snipaste 方便的截图软件,可以复制在屏幕上
猜你喜欢
Codeforces Global Round 21(A-E)
随机事件的关系与运算
DM8 database recovery based on point in time
Azure ad domain service (II) configure azure file share disk sharing for machines in the domain service
L1 regularization and L2 regularization
go-zero微服务实战系列(九、极致优化秒杀性能)
awk从入门到入土(12)awk也可以写脚本,替代shell
The second session of the question swiping and punching activity -- solving the switching problem with recursion as the background (I)
Manjaro install wechat
ctfshow web255 web 256 web257
随机推荐
2022 electrician (intermediate) examination question bank and electrician (intermediate) examination questions and analysis
PHP converts seconds to timestamps - PHP
Leetcode topic [array] -136- numbers that appear only once
Use Alibaba cloud NPM image acceleration
HMS core helps baby bus show high-quality children's digital content to global developers
SSRF vulnerability exploitation - attack redis
学习Nuxt.js
C语言-入门-基础-语法-[变量,常亮,作用域](五)
Cancel ctrl+alt+delete when starting up
From scratch, use Jenkins to build and publish pipeline pipeline project
Relationship and operation of random events
How to re enable local connection when the network of laptop is disabled
Add log file to slim frame - PHP
SQL statement view SQL Server 2005 version number
FRP intranet penetration, reverse proxy
C # implements a queue in which everything can be sorted
Li Kou today's question -1200 Minimum absolute difference
Take you to master the formatter of visual studio code
微服務入門:Gateway網關
Webapi interview question summary 01