Advertisement
noshin98

cf148A

Feb 18th, 2017
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. /*Bismillah*/
  2. /*Subhan Allah Alhamdulillah Allahu Akber*/
  3. #include<stdio.h>
  4. int main()
  5. {
  6.     long int m,n,o,p,q,ans=0,j;
  7.     scanf("%ld%ld%ld%ld%ld",&m,&n,&o,&p,&q);
  8.     {
  9.  
  10.         for(j=1;j<=q;j++)
  11.         {
  12.             if((j%m==0)||(j%n==0)||(j%o==0)||(j%p==0))
  13.             {
  14.  
  15.  
  16.                 ans++;
  17.             }
  18.         }
  19.         printf("%ld\n",ans);
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement