当前位置:网站首页>OJ每日一练——跨越2020
OJ每日一练——跨越2020
2022-06-22 21:00:00 【KJ.JK】
问题描述:
求满足以下方程组的三个正整数a, b, c:

输入
无
输出
a、b、c,空格分开。
输入
无
输出
不提供
Java代码:
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);
}
}
}
}
}
}
作者:KJ.JK
文章对你有所帮助的话,欢迎给个赞或者 star,你的支持是对作者最大的鼓励,不足之处可以在评论区多多指正,交流学习
边栏推荐
- Huawei cloud recruits partners in the field of industrial intelligence to provide strong support + commercial realization
- 一个spark app demo
- eslint 简单配置
- 2021-04-14
- Autoincrement attribute of sqlserver replication table
- Enabling partners, major guarantee of Spring Festival "non-stop"
- js图片分辨率压缩
- 使用HBuilder X编辑器安装终端窗口插件未响应的解决方案
- 2021-01-29
- MySQL master-slave synchronization and its basic process of database and table division
猜你喜欢
随机推荐
Spark SQL accessing JSON and JDBC data sources
Introduction to database access tools
Digital data was invited to participate in Nantong enterprise digital transformation Seminar
'dare not doubt the code, but have to doubt the code 'a network request timeout analysis
多种方案实现图片的懒加载
[redisson] source code analysis of multilock
Greedy interval problem (1)
2020-12-20
Three cache methods and principles
安装typescript环境并开启VSCode自动监视编译ts文件为js文件
Huawei cloud recruits partners in the field of industrial intelligence to provide strong support + commercial realization
Greedy distribution problem (1)
C language -- 17 function introduction
14. 最长公共前缀
使用Redisson操作分布式队列的注意事项
Finding the value of the nth term of Fibonacci sequence by recursion
2021-03-06
js防止PC端复制正确的链接
c语言---17 函数简介
Stop using system Currenttimemillis() takes too long to count. It's too low. Stopwatch is easy to use!








