当前位置:网站首页>Pythagorean tuple od js
Pythagorean tuple od js
2022-07-31 02:19:00 【Big chicken thighs are the best】
let a=readline()
let b=readline()
let res='NA',f=false
function hz(x,y){
let min=Math.min(x,y)
for(let p=2;p<min/2;p++){
if(x%p==0&&y%p==0)return false
}
return true
}
for(let i=a;i<b-2;i++){
for(let j=i+1;j<b-1;j++){
for(let k=j+1;k<b;k++){
if(hz(i,j)&&hz(i,k)&&hz(j,k)){
if(i*i+j*j==k*k){
f=true
console.log(i+' '+j+' '+k)
}
}
}
}
}
if(!f)console.log(res)
边栏推荐
- 基于opencv实现人脸检测
- C语言小程序 -- 常见经典练习题
- Charging effect simulation
- Drools basic introduction, introductory case, basic syntax
- Intranet Infiltration - Privilege Escalation
- tcp框架需要解决的问题
- Fiddler captures packets to simulate weak network environment testing
- leetcode-952: Calculate max component size by common factor
- The principle of complete replication of virtual machines (cloud computing)
- Observer mode (1)
猜你喜欢
二层广播风暴(产生原因+判断+解决)
934. 最短的桥
After reading "MySQL Database Advanced Practice" (SQL Xiao Xuzhu)
tcp框架需要解决的问题
How to do a startup CTO?
Teach you how to configure Jenkins automated email notifications
Coldfusion file read holes (CVE - 2010-2861)
The comprehensive result of the case statement, do you know it?[Verilog Advanced Tutorial]
Basic introduction to ShardingJDBC
Drools basic introduction, introductory case, basic syntax
随机推荐
Drools基本介绍,入门案例,基本语法
AtCoder Beginner Contest 261 部分题解
Maximum monthly salary of 20K?The average salary is nearly 10,000... What is the experience of working in a Huawei subsidiary?
汉诺塔问题
golang GUI for nuxui — HelloWorld
What have I experienced to become a tester who is harder than development?
曼城推出可检测情绪的智能围巾,把球迷给整迷惑了
全流程调度——MySQL与Sqoop
"Cloud native's master, master and vulgar skills" - 2022 National New College Entrance Examination Volume I Composition
BAT can't sell "Medical Cloud": Hospitals flee, mountains stand, and there are rules
Linux下redis7的安装,启动与停止
PDF split/merge
mmdetection训练一个模型相关命令
AI在医疗影像设备全流程应用
MySQL installation tutorial (detailed, package teaching package~)
How to expose Prometheus metrics in go programs
Drools规则属性,高级语法
Nacos
User interaction + formatted output
Is there a way to earn 300 yuan a day by doing a side business?