1 solutions

  • 0
    @ 2025-7-4 9:10:03
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {   
        int a1,a2,n;
        cin>>a1>>a2>>n;
        int b=a2-a1;
        int an=a1+(n-1)*b;
        cout<<setw(3)<<an;
        return 0;
    }
    
    • 1

    Information

    ID
    852
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    2
    Tags
    (None)
    # Submissions
    289
    Accepted
    74
    Uploaded By