当前位置:网站首页>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()
边栏推荐
- io.lettuce.core。RedisCommandTimeoutException命令超时
- 报错:FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS重大开销和将disab补充道
- C语言实现顺序栈和链队列
- e-learning summary
- shardingsphere data sharding configuration item description and example
- Integer 线程安全的
- The JVM thread state
- codeforces Valera and Elections (这思维题是做不明白了)
- rsync:recv_generator: mkdir (in backup) failed:Permission denied (13) |failed to set times on '.'
- leetcode:55. 跳跃游戏
猜你喜欢
变压器的工作原理(图解,原理图讲解,一看就懂)
Altium designer software commonly used the most complete package library, including schematic library, PCB library and 3D model library
Inception V3 Eye Closure Detection
字节跳动面试题之镜像二叉树2020
搭载开源鸿蒙系统的嵌入式XM-RK3568工业互联方案
字节跳动笔试题2020 (抖音电商)
Quectel EC20 4G module dial related
leetcode 之 零移位
install flask
虚拟机网卡报错:Bringing up interface eth0: Error: No suitable device found: no device found for connection
随机推荐
APP product source data interface (taobao, jingdong/spelling/suning/trill platform details a lot data analysis interface) code and docking tutorial
报错:FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS重大开销和将disab补充道
Fragments
先序遍历,中序遍历,后序遍历,层序遍历
Zero shift of leetcode
The working principle of the transformer (illustration, schematic explanation, understand at a glance)
AD picture PCB tutorial 20 minutes clear label shop operation process, copper network
Flask failed to create database without error
Example of using the cut command
The singleton pattern
入门cv必读的10篇baseline论文
CMake中INSTALL_RPATH与BUILD_RPATH问题
高项 01 信息化与信息系统
leetcode:55. 跳跃游戏
Import the pycharm environment package into another environment
【ROS2原理8】节点到参与者的重映射
如何 认识与学习BASH
【nuxt】服务器部署步骤
2022-08-08: Given an array arr, it represents the height of the missiles that will appear in order from morning to night.When the cannon shoots missiles, once the cannon is set to shoot at a certain h
排序第四节——归并排序(附有自己的视频讲解)