当前位置:网站首页>tianqf's problem-solving ideas
tianqf's problem-solving ideas
2022-08-09 07:05:00 【tqfChina】
def gcd(a, b):
if b == 0:
return a
else:
gcd(b, a%b)
def main():
pass
a = input('a:')
b = input('b:')
c = input('c:')
d = input('d:')
if a >= b:
return -1
if c >= d:
return -1
ac = a/gcd(a, c)*c
bd = gcd(b,d)
i = 0
while true:
i += ac
if i <= bd:
if bd%i==0 and i>max(a,c) and i < min(b,d):
print(i)
return 0
else:
return -1
main()
边栏推荐
猜你喜欢
随机推荐
字节跳动笔试题2020 (抖音电商)
mysql summary
Better Scroll Y上下滚动无法上拉滚动解决办法
子路由及路由出口配置
半导体新能源智能装备整机软件系统方案设计
2017.10.26模拟 b energy
用tensorflow.keras模块化搭建神经网络模型
Example of using the cut command
975. 奇偶跳 有序集合
eyb:Redis学习(2)
【ROS2原理8】节点到参与者的重映射
Common Oracle Commands
我入职阿里后,才知道原来简历这么写
Unity first lesson
错误:为 repo ‘oracle_linux_repo‘ 下载元数据失败 : Cannot download repomd.xml: Cannot download repodata/repomd.
分布式id 生成器实现
【修电脑】系统重装但IP不变后VScode Remote SSH连接失败解决
The division principle summary within the collection
Zero shift of leetcode
The JVM thread state









