835A - Key races

835A - Key races


  1. #include<iostream>
  2. using namespace std;
  3. int main(){
  4. int s,v1,t1,v2,t2;
  5. cin>>s>>v1>>v2>>t1>>t2;
  6. int f= s*v1+2*t1;
  7. int sc= s*v2+2*t2;
  8. if(f>sc ) cout<<"Second";
  9. else if(f<sc) cout<<"First";
  10. else if(f==sc) cout <<"Friendship";
  11.  
  12. }

Comments

Popular posts from this blog

Codeforce Problem 1703A. YES or YES?

1535A. Fair Playoff

Aptitude test assistant programmer 2018