#牛客春招刷题训练营# + 链接
简单的倍数知识,n个x的倍数最短是 (n-1)*x+1,最长是 (n+1)*x-1,分类讨论一下
#include <cstdio> #include <iostream> using namespace std; int main() { unsigned n,k,x; scanf("%u%u%u", &n,&k,&x); if ((n-1)*x < k && k < n*x) { printf("%u %u\n", x, x+k-1); } else if (n*x<=k && k<(n+1)*x) { printf("%u %u\n", 1, k); } else { puts("-1"); } return 0; }