cses

solution to cses exercise problems
git clone git://git.superpozycja.net/cses
Log | Files | Refs | README

two_knights.cpp (207B)


      1 #include <bits/stdc++.h>
      2 
      3 using namespace std;
      4 
      5 void solve()
      6 {
      7 	long n;
      8 	cin >> n;
      9 	for (long i = 1; i <= n; i++)
     10 		cout << (i*i * (i*i-1) / 2) - (4 * (i - 1) * (i - 2)) << "\n";
     11 }
     12 
     13 int main()
     14 {
     15 	solve();
     16 }