/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static class AreaPiscina {
static double calcularArea(double raio){
return((raio
>= 0) ? Math.
PI * Math.
pow(raio,
2) : -1); }
}
public static class AreaCasa {
//preço do metro quadrado
static double valorM2 = 1500;
//calcula a área da casa
static double CasaRet(double l_sala, double c_quarto) {
double area_s; //área da sala
double area_q; //área do quarto
double area_t = 0; //área do total
if(l_sala < 0 || c_quarto < 0)
else{
area_s = l_sala * l_sala; //calcula area da sala
area_q = c_quarto * (l_sala/2); //calcula area do quarto
area_t = area_s + 2 * area_q; //calcula a area total
}
return(area_t);
}
}
static double Area(double lateral_1,
double lateral_2,
double pis_raio
) { return(AreaCasa.CasaRet(lateral_1, lateral_2) + AreaPiscina.calcularArea(pis_raio));
}
{
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgY2xhc3MgQXJlYVBpc2NpbmEgewogCiAgICBzdGF0aWMgZG91YmxlIGNhbGN1bGFyQXJlYShkb3VibGUgcmFpbyl7IAogICAgICByZXR1cm4oKHJhaW8gPj0gMCkgPyBNYXRoLlBJICogTWF0aC5wb3cocmFpbywgMikgOiAtMSk7CiAgICB9Cgp9CgpwdWJsaWMgc3RhdGljIGNsYXNzIEFyZWFDYXNhIHsKICAgIC8vcHJlw6dvIGRvIG1ldHJvIHF1YWRyYWRvCiAgICBzdGF0aWMgZG91YmxlIHZhbG9yTTIgPSAxNTAwOwoKICAgIC8vY2FsY3Vs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