当前位置:网站首页>勾股数元组 od js
勾股数元组 od js
2022-07-31 01:18:00 【大鸡腿最好吃】
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)
边栏推荐
- 设置浏览器滚动条样式
- 孩子的编程启蒙好伙伴,自己动手打造小世界,长毛象教育AI百变编程积木套件上手
- xss bypass: prompt(1)
- Rocky/GNU之Zabbix部署(3)
- 人工智能与云安全
- "Actual Combat" based on part-of-speech extraction in the field of e-commerce and its decision tree model modeling
- 297. 二叉树的序列化与反序列化
- 24. 请你谈谈单例模式的优缺点,注意事项,使用场景
- 九州云入选“可信云最新评估体系及2022年通过评估企业名单”
- 程序员工作三年攒多少钱合适?
猜你喜欢
随机推荐
24. 请你谈谈单例模式的优缺点,注意事项,使用场景
倍增、DFS序
射频器件的基本参数2
API 网关 APISIX 在Google Cloud T2A 和 T2D 的性能测试
Rocky/GNU之Zabbix部署(2)
图像处理工具设计
1782. Count the number of point pairs Double pointer
typescript9-常用基础类型
Sping.事务的传播特性
Zabbix干啥用?
typescript10-常用基础类型
ECCV 2022丨轻量级模型架构火了,力压苹果MobileViT(附代码和论文下载)
C语言_结构体指针数组函数选票系统
Analyze the capabilities and scenarios of the cloud native message flow system Apache Pulsar
TiDB 在长银五八消费金融核心系统适配经验分享
TiDB 在多点数字化零售场景下的应用
typescript11-数据类型
ShardingSphere's public table combat (7)
ROS Action通信
In Google Cloud API gateway APISIX T2A and T2D performance test