You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
//难度低
|
|
int main() {
|
|
int m, n, k, p;
|
|
cin >> m >> n >> k >> p;
|
|
int count = 0;
|
|
for (int i = 1; i <= p; i++) {
|
|
if (i % m == 0 || i % n == 0 || i % k == 0) count++;
|
|
}
|
|
cout << count << endl;
|
|
return 0;
|
|
}
|