当前位置:网站首页>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()
边栏推荐
- Rsync常见错误
- Singleton DCL (double check the lock) full han mode and the hungry
- leetcode:55. 跳跃游戏
- 当酷雷曼VR直播遇上视频号,会摩擦出怎样的火花?
- Simple to use Lambda expressions
- P6 ali machine test of 2020 Fibonacci number
- 什么是分布式事务
- ByteDance Interview Questions: Mirror Binary Tree 2020
- XILINX K7 FPGA+RK3399 PCIE驱动调试
- 先序遍历,中序遍历,后序遍历,层序遍历
猜你喜欢
e-learning summary
makefile记录
基于布朗运动的文本生成方法-LANGUAGE MODELING VIA STOCHASTIC PROCESSES
Import the pycharm environment package into another environment
C语言的内置宏(定义日志宏)
(本章节完结)排序第五节——非比较排序(计数排序+基数排序+桶排序)(附有自己的视频讲解)
Altium designer software commonly used the most complete package library, including schematic library, PCB library and 3D model library
使用百度EasyDL实现智能垃圾箱
长沙学院2022暑假训练赛(一)六级阅读
The solution that does not work and does not take effect after VScode installs ESlint
随机推荐
APP product source data interface (taobao, jingdong/spelling/suning/trill platform details a lot data analysis interface) code and docking tutorial
Output method of list string print(*a) print(““.join(str(c) for c in a) )
【修电脑】系统重装但IP不变后VScode Remote SSH连接失败解决
先序遍历,中序遍历,后序遍历,层序遍历
Error: flask: TypeError: 'function' object is not iterable
高项 04 项目变更管理
单例 DCL(double check lock) 饱汉模式和饿汉模式
分布式id 生成器实现
2017.10.26模拟 b energy
Service
分布式事务产生的原因
找出数组中不重复的值php
(本章节完结)排序第五节——非比较排序(计数排序+基数排序+桶排序)(附有自己的视频讲解)
Altium designer软件常用最全封装库,包含原理图库、PCB库和3D模型库
我入职阿里后,才知道原来简历这么写
Error jinja2.exceptions.UndefinedError: 'form' is undefined
排序第二节——选择排序(选择排序+堆排序)(两个视频讲解)
Mysql实操
Search 1688 product interface by image (item_search_img-search 1688 product by image (Politao interface) code docking tutorial
2022.8.8DAY628