题解 | 小红的正整数构造

小红的正整数构造

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

import sys

l,r,x = map(int, input().split())
for i in range(l, r + 1):
    if i % x == 0:
        print(i)
        break
    elif i % x != 0 and i == r:
        print(-1)
    



全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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