Battle of Brains, 2018 University of Dhaka's Internal Programming Contest B. Vibranium Gift Solution

  Solution in C++:

///**********ALLAH IS ALMIGHTY************///

///AH Tonmoy

///Department of CSE,23rd batch

///Islamic University,Bangladesh  

#include<bits/stdc++.h>

using namespace std;

const double pi=acos(-1.0);

int main()

{

    int t,i;

    cin>>t;

    for(i=1;i<=t;i++)

    {

        double m,d,r,v;

        cin>>m>>d;

        v=m/d;

        printf("Case %d: %.4lf\n",i,pow(pow(3.0*v/(4.0*pi),1.0/3),2)*4.0*pi);

    }

}

No comments

Most View Post

Recent post

Codeforces Round 971 (Div. 4) 2009C. The Legend of Freya the Frog Solution

  Problem Link    https://codeforces.com/contest/2009/problem/C S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. h &g...

Powered by Blogger.