当前位置:网站首页>OJ daily practice - spanning 2020
OJ daily practice - spanning 2020
2022-06-22 23:34:00 【KJ. JK】
Problem description :
Find three positive integers satisfying the following equations a, b, c:

Input
nothing
Output
a、b、c, Space apart .
Input
nothing
Output
Does not provide
Java Code :
public class Main{
public static void main(String[] args) {
int a=1;
int b=1;
int c=1;
boolean jk=true;
while(jk) {
a++;
for(int i=0;i<2021;i++) {
for(int j=0;j<2021;j++) {
if(a*i+j==2020&&i*j+a==2021) {
jk=false;
System.out.println(a);
System.out.println(i);
System.out.println(j);
}
}
}
}
}
}
author :KJ.JK
If the article is helpful to you , Welcome to praise or star, Your support is the greatest encouragement to the author , The shortcomings can be corrected in the comments section , Communication and learning
边栏推荐
猜你喜欢

Php7.3 error undefined function simplexml_ load_ string()

C language greedy snake
![[arm] it is reported that horizontal display is set for LVDS screen of rk3568 development board](/img/3c/717b4a481bfff1d37e3c271f37a7d6.png)
[arm] it is reported that horizontal display is set for LVDS screen of rk3568 development board

保证数据库和缓存的一致性

China Mobile's mobile phone users grow slowly, but strive for high profit 5g package users

2020-12-04

c# sqlsugar,hisql,freesql orm框架全方位性能测试对比 sqlserver 性能测试

Spark RDD Programming Guide(2.4.3)

别再用 System.currentTimeMillis() 统计耗时了,太 Low,StopWatch 好用到爆!

2021-08-21
随机推荐
【ARM】讯为rk3568开发板lvds屏设置横屏显示
Spark SQL 访问json和jdbc数据源
口令安全是什么意思?等保2.0政策中口令安全标准条款有哪些?
一个spark app demo
web缓存技术
c语言---17 函数简介
Bubble sort pointer
剑指 Offer 06. 从尾到头打印链表
Stop using system Currenttimemillis() takes too long to count. It's too low. Stopwatch is easy to use!
node-fetch下载文件
Relationship between adau1452 development system interface and code data
Unity: use ray to detect objects
2021-04-14
[arm] it is reported that horizontal display is set for LVDS screen of rk3568 development board
在Word中自定义多级列表样式
Longest word in output string
js----SVG转PNG
Reddit's discussion on lamda model: it is not stateless. It adopts a dual process. Compared with the way it edits Wikipedia, it doesn't matter whether it has feelings or not
2020-12-04
启牛app下载证券开户,是安全的吗?有风险嘛?