done 3 sorting problems

This commit is contained in:
2024-06-03 16:57:59 +02:00
parent cf617f6dfa
commit c817cf7f3c
23 changed files with 85 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
// Two Knights
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n;
cin >> n;
for (ll i = 1; i <= n; i++) {
ll total_possibilities = i * i * (i*i - 1) / 2;
cout << total_possibilities - (4 * (i-1) * (i - 2)) << endl;
}
return 0;
}