diff --git a/Luogu/T249186/T249186.cpp b/Luogu/T249186/T249186.cpp new file mode 100644 index 00000000..e5ed0445 --- /dev/null +++ b/Luogu/T249186/T249186.cpp @@ -0,0 +1,28 @@ +#include +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +int t; + +int main() { + std::ios::sync_with_stdio(false); + cin.tie(nullptr); + + cin >> t; + + while (t--) { + long long l, r, x; + + cin >> l >> r >> x; + + int a = static_cast(std::floor(static_cast(l) / x)), + b = static_cast(std::floor(static_cast(r) / x)); + + cout << (a == b ? a : 1) << endl; + } + + return 0; +}