题解 | 小红的正整数构造

小红的正整数构造

https://www.nowcoder.com/practice/7aa37cbc28034fe5af562ec7e44d1e76

from ast import Pass
l,r,x=list(map(int,input().split()))
a=0
for i in range(l,r+1):
    if i % x==0 and a==0:
        a=1
        print(i)
if a==0:
    print(-1)

全部评论

相关推荐

不愿透露姓名的神秘牛友
04-22 13:08
Data_Seven:真不知道这些企业哪来的成就感
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务