题解 | 小红的正整数构造

小红的正整数构造

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

l, r, x = map(int, input().split())
y = l + x - l % x
print(y if y <= r else -1)

全部评论
import sys l, r, x = map(int, sys.stdin.readline().split()) y = -1 for i in range(l, r + 1): if i % x == 0: y = i print(y)
1 回复 分享
发布于 01-17 20:45 广东

相关推荐

评论
1
收藏
分享

创作者周榜

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