- 多边形内角和
多边形内角和
- 2024-3-3 11:07:07 @
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n=0,sum=0;
cin>>n;
int a[n]={0};
for(int i=1;i<=n-1;i++)
{
cin>>a[i];
}
sum=(n-2)*180;
for(int i=1;i<=n-1;i++)
{
sum=sum-a[i];
}
cout<<sum;
return 0;
}
0 comments
No comments so far...
Information
- ID
- 753
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 7
- Tags
- # Submissions
- 41
- Accepted
- 17
- Uploaded By