2 solutions

  • 0
    @ 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;
    }
    
    • -3
      @ 2025-4-13 15:20:10

      #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; }

      • 1

      Information

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