当前位置:网站首页>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()
边栏推荐
- The maximum validity period of an SSL certificate is 13 months. Is it necessary to apply for multiple years at a time?
- cut命令的使用实例
- vim 程序编辑器的基本操作(积累)
- 【模板】树链剖分 P3384
- 数据一致性架构
- Integer 线程安全的
- (本章节完结)排序第五节——非比较排序(计数排序+基数排序+桶排序)(附有自己的视频讲解)
- 高项 01 信息化与信息系统
- 【Reprint】Deep Learning (deep learning) study notes arrangement
- Tkinter可以选择的颜色
猜你喜欢
随机推荐
集合内之部原理总结
jvm线程状态
01 自然语言处理NLP介绍
2022年7月小结
ByteDance Interview Questions: Mirror Binary Tree 2020
The working principle of the transformer (illustration, schematic explanation, understand at a glance)
vlucas/phpdotenv phpdotenv获取变量内容偶尔出现返回false
什么是分布式事务
细谈VR全景:数字营销时代的宠儿
【模板】树链剖分 P3384
975. 奇偶跳 有序集合
用tensorflow.keras模块化搭建神经网络模型
单例 DCL(double check lock) 饱汉模式和饿汉模式
cut命令的使用实例
【烂笔头】各厂商手机手动抓log
bzoj 5333 [Sdoi2018]荣誉称号
排序第四节——归并排序(附有自己的视频讲解)
(本章节完结)排序第五节——非比较排序(计数排序+基数排序+桶排序)(附有自己的视频讲解)
如何 认识与学习BASH
car-price-deeplearning-0411








