Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

TheLagestSmallestBox/김상섭

From ZeroWiki
Revision as of 05:28, 7 February 2021 by imported>Unknown
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
#include <iostream> 
#include <math.h> 
using namespace std; 

void process(double L, double W) 
{ 
    cout.setf(ios::fixed, ios::floatfield);    
    cout.setf(ios::showpoint);    
    cout.precision(3);  
    double a = 12; 
	double b = -4*L -4*W; 
    double c = L*W; 
    double min = L; 
    if(W < L) 
        min = W; 
    cout << -b/2.0/a - sqrt(b*b -4*a*c)/2.0/a << " " << 0.0 << " " << min/2.0 << endl; 
}

int main() 
{ 
    double L,W; 

    while(cin >> L >> W) 
    { 
        process(L,W); 
    } 

    return 0; 
}