当前位置:网站首页>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()
边栏推荐
- AD picture PCB tutorial 20 minutes clear label shop operation process, copper network
- 【sqlite3】sqlite3.OperationalError: table addresses has 7 columns but 6 values were supplied
- car-price-deeplearning-0411
- failed (13: Permission denied) while connecting to upstream
- MUV LUV EXTRA 2019CCPC Qinhuangdao Station J Question KMP
- Inception V3 Eye Closure Detection
- Distributed id generator implementation
- Example of using the cut command
- Neural Network Optimizer
- 神经网络优化器
猜你喜欢
随机推荐
字节跳动面试题之镜像二叉树2020
灵活好用的sql monitoring 脚本 part7
failed (13: Permission denied) while connecting to upstream
car-price-deeplearning-0411
Integer 线程安全的
长沙学院2022暑假训练赛(一)六级阅读
错误:为 repo ‘oracle_linux_repo‘ 下载元数据失败 : Cannot download repomd.xml: Cannot download repodata/repomd.
P7阿里面试题2020.07 之滑动窗算法(阿里云面试)
Lottie系列二:高级属性
TCP段重组PDU
longest substring without repeating characters
更改Jupyter Notebook默认打开目录
排序第一节——插入排序(直接插入排序+希尔排序)(视频讲解26分钟)
事务总结
The JVM thread state
Codeforces Round #359 (Div. 2) C. Robbers' watch 暴力枚举
学习小笔记---机器学习
Better Scroll Y上下滚动无法上拉滚动解决办法
Forest Program dfs+tanjar仙人掌
Zero shift of leetcode









