Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int i, a, b, c, d, num, cnt = 0;
- scanf("%d %d %d %d %d", &a, &b, &c, &d, &num);
- for(i = 1; i <= num; ++i){
- if(i % a == 0 || i % b == 0 || i % c == 0 || i % d == 0) ++cnt;
- }
- printf("%d", cnt);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement