1 solutions

  • 0
    @ 2025-11-5 18:26:52

    C++ :

    #include <iostream> 
    #include <iomanip> 
    using namespace std;
    int main()
    {
        int x, a, y, b;
        cin >> x >> a >> y >> b;
        double z = (y * b - x * a) * 1.0 / (b - a);
        cout << fixed << setprecision(2) << z << endl;
        return 0;
    }
    
    
    • 1

    Information

    ID
    18881
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By