Solution-
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
ll d1,v1,d2,v2,p,i,sum=0;
cin>>d1>>v1>>d2>>v2>>p;
for(i=1;i<=10000;i++)
{
if(d1<=i)
sum+=v1;
if(d2<=i)
sum+=v2;
if(sum>=p)
break;
}
cout<<i;
}
competitive programming guides eg.algorithms,problems,tricks ,datastructure based on cp.
Are you ready to level up your web development game? Look no further than Next.js, the latest sensation in the world of web development th...
No comments:
Post a Comment