当前位置:网站首页>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()
边栏推荐
- 我入职阿里后,才知道原来简历这么写
- mysql summary
- Flask failed to create database without error
- Mysql实操
- stm32定时器之简单封装
- Altium designer software commonly used the most complete package library, including schematic library, PCB library and 3D model library
- P6 ali machine test of 2020 Fibonacci number
- 多米诺骨牌
- 长沙学院2022暑假训练赛(一)六级阅读
- APP商品详情源数据接口(淘宝/京东/拼多多/苏宁/抖音等平台详情数据分析接口)代码对接教程
猜你喜欢
找不到和chrome浏览器版本不同的chromedriver的解决方法
Teach you how to make the Tanabata meteor shower in C language - elegant and timeless (detailed tutorial)
金九银十即将到来,求职套路多,面试指南我来分享~
C language implements sequential stack and chain queue
Fragments
Integer 线程安全的
install flask
C语言的内置宏(定义日志宏)
e-learning summary
Distributed id generator implementation
随机推荐
按图搜索1688商品接口(item_search_img-按图搜索1688商品(拍立淘接口)代码对接教程
Import the pycharm environment package into another environment
Simple to use Lambda expressions
先序遍历,中序遍历,后序遍历,层序遍历
常见的分布式事务解决方案
Error: flask: TypeError: 'function' object is not iterable
VS2019 common shortcut keys
高德地图JS - 已知经纬度来获取街道、城市、详细地址等信息
AD picture PCB tutorial 20 minutes clear label shop operation process, copper network
P6 ali machine test of 2020 Fibonacci number
【报错】Root Cause com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
排序第四节——归并排序(附有自己的视频讲解)
(本章节完结)排序第五节——非比较排序(计数排序+基数排序+桶排序)(附有自己的视频讲解)
如何 认识与学习BASH
找不到和chrome浏览器版本不同的chromedriver的解决方法
无重复的字符的最长子串
SIGINT, SIGKILL, SIGTERM signal difference, summary of various signals
【Docker】Docker安装MySQL
The JVM thread state
TCP段重组PDU