Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Codeforces Round 148A
- #include <iostream>
- using namespace std;
- int main()
- {
- int k, l, m, n, d, answ=0;
- cin >> k >> l >> m >> n >> d;
- for(int i=1;i<d+1;i++)
- {
- if(i%k==0){answ++;}
- else if(i%l==0){answ++;}
- else if(i%m==0){answ++;}
- else if(i%n==0){answ++;}
- }
- cout << answ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement