아 영어 왤케 어려워!
Triangulation @-=!
읽고 이해 못해서 다시 읽고 읽고 하다가 아래의 Note 보고 겨우 이해했다.
진짜 읽다가 다각형...? 삼각형으로 나누는데 ...? 겹치는게 없고...? ..? ? ?
?
?? ? 썬더?
푸는 건 쉬웠다
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <functional>
#include <string>
#include <queue>
#include <stack>
#include <set>
using namespace std;
using i64 = long long;
using ii = pair<int, int>;
int main() {
int n;
scanf("%d", &n);
i64 sum = 0;
for (int i = 3; i <= n; i++)
{
sum += (i-1) * i;
}
cout << sum;
return 0;
}
코드도 간단함
굿
'코드포스' 카테고리의 다른 글
[코드포스 Practice18] C. Vanya and Exams (0) | 2020.04.16 |
---|---|
[코드포스 Practice18] B. Dreamoon and WiFi (0) | 2020.04.16 |
[코드포스 Practice18] 후기 (0) | 2020.04.16 |
[코드포스 Practice17] E. Day at the Beach (0) | 2020.04.11 |
[코드포스 Practice17] D. Pasha and String (0) | 2020.04.11 |