Sponsors

Tag: problem: (A) Mister B and Book Reading Solve In C/C++

Codeforces Round #421 (Div....

#include <iostream> using namespace std; int c,v,vl,l,a; int main(){ cin>>c>>v>>vl>>a>>l; int s=1; for(int i=v;i<c;){ v+=a; if(v>vl) v=vl; i-=l; i+=v; s++;} cout<<s<<endl; }

Advertisement

spot_img