题解 | 小红的正整数构造
小红的正整数构造
https://www.nowcoder.com/practice/7aa37cbc28034fe5af562ec7e44d1e76
l,r,x = map(int,input().split()) temp = x while 1: if l<=temp<=r: print(temp) break elif temp > r: print(-1) break temp += x
小红的正整数构造
https://www.nowcoder.com/practice/7aa37cbc28034fe5af562ec7e44d1e76
l,r,x = map(int,input().split()) temp = x while 1: if l<=temp<=r: print(temp) break elif temp > r: print(-1) break temp += x
相关推荐