AlbertMourato

Untitled

Nov 24th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4.     int distancia,velGuard,velFuj;
  5.     while(cin>>distancia){
  6.         cin>>velFuj;
  7.         cin>>velGuard;
  8.         double v2 = (double)(distancia*distancia)+(velFuj*velFuj);
  9.         double time1 = (double)12.0/velFuj;
  10.         double time2 = (double)v2/(velGuard*velGuard);
  11.         if(time1>time2){
  12.             cout<<"S"<<"\n";
  13.         }
  14.         else{
  15.             cout<<"N"<<"\n";
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment