-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathk_divisible_sum(math).cpp
More file actions
46 lines (35 loc) · 1.22 KB
/
k_divisible_sum(math).cpp
File metadata and controls
46 lines (35 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
// for ordered_set(policy based data structure)
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define faster_ayman ios_base::sync_with_stdio(false);cin.tie(NULL);
#define int long long
#define pb push_back
#define rep(i, a, b) for (auto i = a; i < b; i++)
#define all(a) (a).begin(), (a).end()
#define testcase int tt;cin >> tt;while (tt--)
#define inf 1e18
#define _ << ' ' <<
typedef vector<int> vi;
typedef vector<pair<int,int>> vp;
typedef vector<double> vd;
typedef vector<char> vc;
typedef set<int> si;
typedef set<char> sc;
typedef unordered_set<int> usi;
void solve() {
int n, k; cin >> n >> k;
k *= (n + k - 1) / k;
cout << (k + n - 1) / n << '\n';
}
signed main() {
faster_ayman
testcase {
solve();
}
return 0;
}