当前位置:网站首页>tianqf的解题思路
tianqf的解题思路
2022-08-09 06:58: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()
边栏推荐
猜你喜欢

移远EC20 4G模块拨号相关

金九银十即将到来,求职套路多,面试指南我来分享~

Use of PlantUML plugin in idea

Quectel EC20 4G module dial related

XILINX K7 FPGA+RK3399 PCIE驱动调试

Use baidu EasyDL intelligent bin

长沙学院2022暑假训练赛(一)六级阅读

The Integer thread safe

The working principle of the transformer (illustration, schematic explanation, understand at a glance)

Error jinja2.exceptions.UndefinedError: 'form' is undefined
随机推荐
Integer 线程安全的
字节跳动面试题之镜像二叉树2020
AD画PCB板教程 20分钟讲清楚操作流程 铺铜 网络标号
leetcode 之 70 爬楼梯问题 (斐波那契数)
XxlJobConfig分布式定时器任务管理XxlJob配置类,替代
【Shell】查找进程的pid并根据pid获取该进程所占用的端口号以及该进程在系统中所下达的指令名称
排序第一节——插入排序(直接插入排序+希尔排序)(视频讲解26分钟)
MySQL高级特性之分布式(XA)事务的介绍
Built-in macros in C language (define log macros)
The working principle of the transformer (illustration, schematic explanation, understand at a glance)
vlucas/phpdotenv phpdotenv获取变量内容偶尔出现返回false
Service
默默重新开始,第一页也是新的一页
多米诺骨牌
排序第三节——交换排序(冒泡排序+快速排序+快排的优化)(5个视频讲解)
ByteDance Interview Questions: Mirror Binary Tree 2020
The Integer thread safe
Common Oracle Commands
P6阿里机试题之2020 斐波那契数
【修电脑】系统重装但IP不变后VScode Remote SSH连接失败解决