Prvaa zadaca

mail@pastecode.io avatar
unknown
plain_text
2 years ago
290 B
2
Indexable
#include <iostream>

using namespace std;

int main()
{
 int c,k,p,kim,v,d,b,m,prva,vtora;
 cin>>kim;
 cin>>c>>k>>p;
 cin>>v>>b>>m>>d;
 prva=c+(kim-k)*p;
 vtora=b+(kim/v)*m+kim*d;
 cout<<prva<<" "<<vtora<<endl;
 if(prva<=vtora)
 {
     cout<<"1";
 }
    else
    cout<<"0";
    return 0;
}