problem details: https://www.urionlinejudge.com.br/judge/en/problems/view/1039
Solution in c+++:
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int r1, x1, y1, r2, x2, y2;
float instance;
while(cin >> r1 >> x1 >> y1 >> r2 >> x2 >> y2)
{
instance= sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));
if((r1 - instance) >= r2){
cout << "RICO" << endl;
}else{
cout << "MORTO" << endl;
}
}
return 0;
}
/ ^^^^^^^
uri online judge3 uri online judge wiki uri 1219 uri 1219 solution in c uri online judge ranking online uri python online judge uri problem solution ^^^^^^/
Will you please give the solution in python
ReplyDelete