2 solutions

  • 2
    @ 2025-4-19 11:55:59
    #include<bits/stdc++.h> 
    using namespace std;
    int main()
    { 
      int n,m,x,t,d;
      cin>>n>>m>>x>>t>>d;
      if(m>=x)
      { 
        cout<<t; 
      }
      else
      { 
      cout<<t-(x-m)*d;
      }
      return 0;
    }
    

    Information

    ID
    2361
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    # Submissions
    33
    Accepted
    19
    Uploaded By