当前位置:网站首页>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 from entry to penetration (6) regular matching
- deno debugger
- swatch
- 随机事件的关系与运算
- Go zero micro service practical series (IX. ultimate optimization of seckill performance)
- DM8 command line installation and database creation
- Internal learning
- Horizon sunrise X3 PI (I) first boot details
- 2022 tower crane driver examination and tower crane driver examination questions and analysis
- 2022 electrician (intermediate) examination question bank and electrician (intermediate) examination questions and analysis
猜你喜欢
go-zero微服务实战系列(九、极致优化秒杀性能)
A method for detecting outliers of data
Codeforces Round #750 (Div. 2)(A,B,C,D,F1)
Basic operations of databases and tables ----- view data tables
Call Baidu map to display the current position
Codeforces Round #803 (Div. 2)(A-D)
High order phase difference such as smear caused by myopic surgery
MySQL relearn 1-centos install mysql5.7
AcWing 244. Enigmatic cow (tree array + binary search)
What if the wireless network connection of the laptop is unavailable
随机推荐
SQL statement view SQL Server 2005 version number
DM database password policy and login restriction settings
C#实现一个万物皆可排序的队列
Azure ad domain service (II) configure azure file share disk sharing for machines in the domain service
AcWing 244. Enigmatic cow (tree array + binary search)
Awk from entry to earth (7) conditional statements
Cancel ctrl+alt+delete when starting up
SSRF vulnerability exploitation - attack redis
一文了解數據异常值檢測方法
@Role of pathvariable annotation
Manjaro install wechat
Awk from getting started to digging in (9) circular statement
How to re enable local connection when the network of laptop is disabled
C # implements a queue in which everything can be sorted
A single element in an ordered array
High order phase difference such as smear caused by myopic surgery
09 softmax regression + loss function
[error record] no matching function for call to 'cacheflush' cacheflush();)
System disk expansion in virtual machine
Educational Codeforces Round 119 (Rated for Div. 2)