AlbertMourato

Untitled

Nov 23rd, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4.     int D,VF,VG;
  5.     while(cin>>D){
  6.         cin>>VF;
  7.         cin>>VG;
  8.         double v2 = (double)(D*D)+(double)(VF*VF);
  9.         double val=sqrt(v2);
  10.         double t1 = (double)12.0/VF;
  11.         double t2 = (double)val/VG;
  12.         if(t1>t2){
  13.             cout<<"S"<<endl;
  14.         }
  15.         else{
  16.             if(t2>=t1){
  17.                 cout<<"N"<<endl;
  18.             }
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment