2 solutions

  • 1
    @ 2025-9-7 14:58:23

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

    int main() { int n, a ; cin >> n; int m = (n - 2) * 180; for (int i = 1; i < n; i++) { cin >> a; m = m - a; } cout << m; return 0; }

    • -1
      @ 2025-9-7 14:39:27

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

      int main() { int n, a, s = 0; cin >> n ; s = (n - 2) * 180; for (int i = 1; i < n ; i++) { cin >> a; s = s - a;

      }
      
      cout << s;
      return 0;
      

      }

      • 1

      Information

      ID
      194
      Time
      1000ms
      Memory
      64MiB
      Difficulty
      4
      Tags
      # Submissions
      111
      Accepted
      53
      Uploaded By