2 solutions

  • 0
    @ 2026-2-2 12:25:22

    #include <bits/stdc++.h>

    using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << a + (c - 1)*(b - a); return 0; }

    • -1
      @ 2026-1-9 13:42:50

      #include <bits/stdc++.h> using namespace std;

      int main() { int a, b, c; cin >> a >> b >> c; printf("%d", a + (b - a) * (c - 1)); return 0; }

      • 1

      Information

      ID
      547
      Time
      1000ms
      Memory
      128MiB
      Difficulty
      3
      Tags
      # Submissions
      140
      Accepted
      75
      Uploaded By