Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: wasupum

Problemset: Power Roll

Language: c

Time: 0.002 second

Submitted On: 2025-12-06 14:38:43

#include <stdio.h>
#include <math.h>
const double P = 3.28,S = 1.15112, N = 4.80852, L = 13.0725 ,PI = 3.14159;
const int D = 69;

void mulmat(double a[][2],double b[],double c[]){
    c[0] = a[0][0]*b[0]+a[0][1]*b[1];
    c[1] = a[1][0]*b[0]+a[1][1]*b[1];
}

int main(void){
    long double I,V,l,H;
    long double deg,px,py,d;
    scanf("%Lf %Lf %Lf %Lf",&I,&V,&l,&H);
    scanf("%Lf %Lf %Lf %Lf",&deg,&px,&py,&d);
    double rad = deg * PI / 180.0;
    double M[2][2],p[2],c[2];
    M[0][0] = cos(rad);
    M[0][1] = -sin(rad);
    M[1][0] = sin(rad);
    M[1][1] = 1;
    p[0] = px;
    p[1] = py;
    mulmat(M,p,c);
    double A = P *
        (log(
            fabs(
                 cbrt(
                      (tan(((sqrt(pow(c[0],2) + pow(c[1],2)))/L)*P)*I*V)
                      /
                      (l*(fmod(ceil(exp(N*d)),D)*cbrt(H)))
                 )
            )
        )
        /log(S)
        );
    double res = round(A * 1e4) / 1e4;
    printf("%g NP",res);
    return 0;
}