#include<iostream>
using namespace std;
int main()
{
int k,l,m,n;
long d,count=0;
cin>>k>>l>>m>>n>>d;
for(long i=1;i<=d;i++)
{
if(i%k!=0 and i%l!=0 and i%m!=0 and i%n!=0)
count++;
}
cout<<d-count;
return 0;
}
#include < bits / stdc ++. h > using namespace std ; int main () { string str ; getline ( cin , str ); int index = str . find ( "WUB" ); int count = 0 ; while ( index !=- 1 ) { str . replace ( index , 3 , " " ); //str.erase(str.begin()+index,str.begin()+index+3); index = str . find ( "WUB" ); } cout << str ; return 0 ; }
Comments
Post a Comment