#include<iostream>
using namespace std;
int main( )
{
int v,v2,t,s,l;
cin>>v>>v2>>t>>s>>l;
int tim1=0;
int tim2=0;
int l1=0;
int l2=0;
while(l1!=l&&l2!=l)
{
if((l1-l2)>=t)
{
tim2+=s;
l2=v2*tim2;
}
else
{
tim1++;
tim2++;
l1=v*tim1;
l2=v2*tim2;
}
}
if(l1==l2)
cout<<"D"<<endl<<tim2;
else if(l2<l1)
cout<<"R"<<endl<<tim2;
else
cout<<"T"<<endl<<l/v2;
return 0;
}
龟兔赛跑预测(模拟)
最新推荐文章于 2020-07-04 19:26:10 发布