mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-08 15:58:48 +00:00
parent
7bb4dfdc6e
commit
60c822c3e0
28
Luogu/T249186/T249186.cpp
Normal file
28
Luogu/T249186/T249186.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
|
||||
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<long long>(std::floor(static_cast<long double>(l) / x)),
|
||||
b = static_cast<long long>(std::floor(static_cast<long double>(r) / x));
|
||||
|
||||
cout << (a == b ? a : 1) << endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user