forked from Code-Cube-NITP/Competitive-Programming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCRWDCN.cpp
More file actions
executable file
·35 lines (29 loc) · 847 Bytes
/
CRWDCN.cpp
File metadata and controls
executable file
·35 lines (29 loc) · 847 Bytes
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
// g++ CRWDCN.cpp -o CRWDCN && ./CRWDCN
/*
*/
#include <bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cerr.tie(NULL)
#define endl '\n'
#define int long long int
using namespace std;
#define pii pair <int, int>
#define pb push_back
#define deb(x) cout << #x << " " << x << endl
#define deb2(x, y) cout << #x << " " << x << " " << #y << " " << y << endl
#define loop(s, e, itr) for (int itr = s; itr < e; itr++)
#define vin vector<int>
#define w(t) int tc; cin >> tc; for(int t = 1; t <= tc; t++)
int lcm(int a, int b){
return (a*b)/__gcd(a,b);
}
int32_t main(){
int n, x, y, z;
w(t){
cin >> n;
n *= 24;
cin >> x >> y >> z;
int temp = lcm(x, lcm(y, z));
int ans = n/temp;
cout << ans << endl;
}
}