output
stringlengths
52
181k
instruction
stringlengths
296
182k
#include <bits/stdc++.h> using namespace std; int main() { int a, i, sum = 0; cin >> a; for (i = 1; i <= a; i++) { if (i == 1) sum = sum + 1; else sum = sum + 12 * (i - 1); } cout << sum; }
### Prompt Your task is to create a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int a, i, sum = 0; cin >> a; for (i = 1; i <= a; i++) { if (i == 1) sum = sum + 1; else sum = sum + 12 * (i - 1); } cout << sum; } ```
#include <bits/stdc++.h> int main() { int n, a = 1, b = 12; scanf(" %d", &n); for (int i = 0; i < n - 1; i++) { a += b; b += 12; } printf("%d", a); }
### Prompt In cpp, your task is to solve the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { int n, a = 1, b = 12; scanf(" %d", &n); for (int i = 0; i < n - 1; i++) { a += b; b += 12; } printf("%d", a); } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; while (~scanf("%d", &n)) { int res = 1; for (int i = 1; i < n; i++) res += i * 12; printf("%d\n", res); } return 0; }
### Prompt Construct a cpp code solution to the problem outlined: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; while (~scanf("%d", &n)) { int res = 1; for (int i = 1; i < n; i++) res += i * 12; printf("%d\n", res); } return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << ((3 * n - 2) * (3 * n - 1) + 3 * (n) * (n - 1)) / 2 << endl; }
### Prompt Please provide a CPP coded solution to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << ((3 * n - 2) * (3 * n - 1) + 3 * (n) * (n - 1)) / 2 << endl; } ```
#include <bits/stdc++.h> using namespace std; int n, ans; int main() { cin >> n; ans = (2 * n - 1) * (2 * n - 1) + 4 * (n - 1) * (n) / 2; cout << ans << endl; return 0; }
### Prompt Please create a solution in Cpp to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int n, ans; int main() { cin >> n; ans = (2 * n - 1) * (2 * n - 1) + 4 * (n - 1) * (n) / 2; cout << ans << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << (2 * n - 1) * (2 * n - 1) + 4 * (n - 1) * n / 2; return 0; }
### Prompt Please formulate a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << (2 * n - 1) * (2 * n - 1) + 4 * (n - 1) * n / 2; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { long long i; while (scanf("%I64d", &i) != EOF) { long long ans = (3 * i - 1) * (3 * i - 2) / 2 + 3 * i * (i - 1) / 2; printf("%I64d\n", ans); } return 0; }
### Prompt Generate a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long i; while (scanf("%I64d", &i) != EOF) { long long ans = (3 * i - 1) * (3 * i - 2) / 2 + 3 * i * (i - 1) / 2; printf("%I64d\n", ans); } return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { long long res = 1; int a; cin >> a; for (int i = 1; i < a; i++) { res += 12 * i; } cout << res << endl; }
### Prompt Your task is to create a cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long res = 1; int a; cin >> a; for (int i = 1; i < a; i++) { res += 12 * i; } cout << res << endl; } ```
#include <bits/stdc++.h> using namespace std; int pray(int a) { if (a == 1) return 1; if (a == 2) return 13; return ((a - 1) * 12) + pray(a - 1); } int main() { ios_base::sync_with_stdio(false); int a; cin >> a; cout << pray(a); }
### Prompt Your challenge is to write a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int pray(int a) { if (a == 1) return 1; if (a == 2) return 13; return ((a - 1) * 12) + pray(a - 1); } int main() { ios_base::sync_with_stdio(false); int a; cin >> a; cout << pray(a); } ```
#include <bits/stdc++.h> using namespace std; const long double PI = 3.1415926535897932384626433832795; const long double EPS = 1e-11; int main() { cout << setiosflags(ios::fixed) << setprecision(10); int t = 13; int n; cin >> n; if (n == 1) cout << 1; else { int k = 24; for (int i = 0; i < (n - 2); i++) { t += k; k += 12; } cout << t; } return 0; }
### Prompt Please formulate a cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; const long double PI = 3.1415926535897932384626433832795; const long double EPS = 1e-11; int main() { cout << setiosflags(ios::fixed) << setprecision(10); int t = 13; int n; cin >> n; if (n == 1) cout << 1; else { int k = 24; for (int i = 0; i < (n - 2); i++) { t += k; k += 12; } cout << t; } return 0; } ```
#include <bits/stdc++.h> using namespace std; int main(void) { int n; scanf("%d", &n); printf("%d", 6 * n * (n - 1) + 1); }
### Prompt Your task is to create a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main(void) { int n; scanf("%d", &n); printf("%d", 6 * n * (n - 1) + 1); } ```
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; if (a == 1) cout << 1; else cout << 6 * a * (a - 1) + 1; return 0; }
### Prompt Please formulate a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; if (a == 1) cout << 1; else cout << 6 * a * (a - 1) + 1; return 0; } ```
#include <bits/stdc++.h> using namespace std; int a; int main() { cin >> a; cout << 6 * a * (a - 1) + 1; }
### Prompt Construct a cpp code solution to the problem outlined: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int a; int main() { cin >> a; cout << 6 * a * (a - 1) + 1; } ```
#include <bits/stdc++.h> int main() { int n; scanf("%d", &n); long long a = 1, b = 12; for (int i = 0; i < n - 1; i++) { a += b; b += 12; } printf("%I64d\n", a); return 0; }
### Prompt Create a solution in Cpp for the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { int n; scanf("%d", &n); long long a = 1, b = 12; for (int i = 0; i < n - 1; i++) { a += b; b += 12; } printf("%I64d\n", a); return 0; } ```
#include <bits/stdc++.h> using namespace std; const int maxN = 30 + 321; int main() { ios::sync_with_stdio(0); int n; cin >> n; long long ans = 0; if (n == 1) { cout << '1' << endl; return 0; } ans = 1; for (int i = 2; i <= n; i++) ans += 11 * (i - 1) + i - 1; cout << ans << endl; return 0; }
### Prompt Please provide a CPP coded solution to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; const int maxN = 30 + 321; int main() { ios::sync_with_stdio(0); int n; cin >> n; long long ans = 0; if (n == 1) { cout << '1' << endl; return 0; } ans = 1; for (int i = 2; i <= n; i++) ans += 11 * (i - 1) + i - 1; cout << ans << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); long long n; cin >> n; n--; cout << ((3 * n + 1) * (3 * n + 2) / 2) + (3 * (n) * (n + 1) / 2) << endl; return 0; }
### Prompt In CPP, your task is to solve the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); long long n; cin >> n; n--; cout << ((3 * n + 1) * (3 * n + 2) / 2) + (3 * (n) * (n + 1) / 2) << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int t; scanf("%d", &t); printf("%lld", (long long)(t * 3 - 2) * (t * 3 - 1) / 2 + (long long)t * 3 * (t - 1) / 2); }
### Prompt Please create a solution in cpp to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int t; scanf("%d", &t); printf("%lld", (long long)(t * 3 - 2) * (t * 3 - 1) / 2 + (long long)t * 3 * (t - 1) / 2); } ```
#include <bits/stdc++.h> using namespace std; int main() { int a = 0, output = 0, last = 1, i = 1, j = -1; cin >> a; for (int k = 1; k <= a; k++) { output = last + 2 * i + 2 * j; i += 2; j += 4; last = output; } cout << output; return 0; }
### Prompt Please formulate a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int a = 0, output = 0, last = 1, i = 1, j = -1; cin >> a; for (int k = 1; k <= a; k++) { output = last + 2 * i + 2 * j; i += 2; j += 4; last = output; } cout << output; return 0; } ```
#include <bits/stdc++.h> using namespace std; signed main() { long long n, ans = 0; cin >> n; for (long long i = 2; i <= n; i++) ans += (i * 2 - 1) * 6 - 6; cout << ans + 1; }
### Prompt Create a solution in cpp for the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; signed main() { long long n, ans = 0; cin >> n; for (long long i = 2; i <= n; i++) ans += (i * 2 - 1) * 6 - 6; cout << ans + 1; } ```
#include <bits/stdc++.h> int N; int main() { scanf("%d", &N); printf("%d", (N - 1) * N * 6 + 1); return 0; }
### Prompt Your task is to create a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int N; int main() { scanf("%d", &N); printf("%d", (N - 1) * N * 6 + 1); return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << (n * n * 6) - 6 * (n - 1) - 5 << endl; return 0; }
### Prompt Construct a CPP code solution to the problem outlined: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << (n * n * 6) - 6 * (n - 1) - 5 << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; cout << n * 6 * (n - 1) + 1; return 0; }
### Prompt Your task is to create a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; cout << n * 6 * (n - 1) + 1; return 0; } ```
#include <bits/stdc++.h> using namespace std; long long xd(long long n) { return (((n - 1) * 12) * n) / 2 + 1; } int main() { long long n; cin >> n; cout << xd(n) << endl; return 0; }
### Prompt Develop a solution in CPP to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; long long xd(long long n) { return (((n - 1) * 12) * n) / 2 + 1; } int main() { long long n; cin >> n; cout << xd(n) << endl; return 0; } ```
#include <bits/stdc++.h> int main() { int ans = 1, n; scanf("%d", &n); for (int i = 1; i < n; i++) ans += 12 * i; printf("%d\n", ans); return 0; }
### Prompt Please formulate a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { int ans = 1, n; scanf("%d", &n); for (int i = 1; i < n; i++) ans += 12 * i; printf("%d\n", ans); return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int i, t = 1, ekle = 0, x; cin >> x; for (i = 1; i <= x; i++) { t += ekle; ekle += 12; } cout << t << endl; return 0; }
### Prompt Please provide a Cpp coded solution to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int i, t = 1, ekle = 0, x; cin >> x; for (i = 1; i <= x; i++) { t += ekle; ekle += 12; } cout << t << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; const int mod = 1000000007; const int maxn = 1000000 + 10; int main() { int n; cin >> n; long long int s = 1; for (int i = 1; i < n; i++) s += i * 12; cout << s << endl; }
### Prompt Your task is to create a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; const int mod = 1000000007; const int maxn = 1000000 + 10; int main() { int n; cin >> n; long long int s = 1; for (int i = 1; i < n; i++) s += i * 12; cout << s << endl; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; int a[18258]; a[0] = 1; a[1] = 12; a[2] = 24; int i; for (i = 3; i < 18257; i++) a[i] = a[i - 1] + 12; while (cin >> n) { long long sum = 0; for (i = 0; i < n; i++) sum += a[i]; cout << sum << endl; } return 0; }
### Prompt Develop a solution in CPP to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; int a[18258]; a[0] = 1; a[1] = 12; a[2] = 24; int i; for (i = 3; i < 18257; i++) a[i] = a[i - 1] + 12; while (cin >> n) { long long sum = 0; for (i = 0; i < n; i++) sum += a[i]; cout << sum << endl; } return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << 1 + (n) * (n - 1) / 2 * 12 << endl; return 0; }
### Prompt Generate a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << 1 + (n) * (n - 1) / 2 * 12 << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { long long N; cin >> N; long long res = (6 * N) * (N - 1) + 1; cout << res << endl; return 0; }
### Prompt Your challenge is to write a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long N; cin >> N; long long res = (6 * N) * (N - 1) + 1; cout << res << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int i; int s = 1; for (i = 2; i <= n; i++) { s += (i - 1) * 12; } cout << s << endl; return 0; }
### Prompt Your task is to create a cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int i; int s = 1; for (i = 2; i <= n; i++) { s += (i - 1) * 12; } cout << s << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int arr[18530]; arr[0] = 0; arr[1] = 1; arr[2] = 13; for (int i = 3; i <= 18527; i++) arr[i] = 12 * (i - 1) + arr[i - 1]; int n; cin >> n; cout << arr[n] << endl; }
### Prompt Your task is to create a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int arr[18530]; arr[0] = 0; arr[1] = 1; arr[2] = 13; for (int i = 3; i <= 18527; i++) arr[i] = 12 * (i - 1) + arr[i - 1]; int n; cin >> n; cout << arr[n] << endl; } ```
#include <bits/stdc++.h> using namespace std; template <class T> void read(T &x) { cin >> x; } template <class A> void read(vector<A> &x) { for (auto &a : x) read(a); } string to_string(bool b) { return b ? "TRUE" : "FALSE"; } string yesno(bool b) { return b ? "YES" : "NO"; } string to_string(char c) { return string(1, c); } void print() { cout << "\n"; } template <class A> void print(vector<A> a) { for (auto &x : a) cout << to_string(x) << " "; print(); } template <class A> void print(vector<vector<A>> a) { for (auto &x : a) print(x); } void solve() { int a; read(a); long long ans = 1; for (int i = 1; i < a; i++) ans += 12 * i; cout << ans; } int main() { ios::sync_with_stdio(false); solve(); cout << "\n"; return 0; }
### Prompt Generate a cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; template <class T> void read(T &x) { cin >> x; } template <class A> void read(vector<A> &x) { for (auto &a : x) read(a); } string to_string(bool b) { return b ? "TRUE" : "FALSE"; } string yesno(bool b) { return b ? "YES" : "NO"; } string to_string(char c) { return string(1, c); } void print() { cout << "\n"; } template <class A> void print(vector<A> a) { for (auto &x : a) cout << to_string(x) << " "; print(); } template <class A> void print(vector<vector<A>> a) { for (auto &x : a) print(x); } void solve() { int a; read(a); long long ans = 1; for (int i = 1; i < a; i++) ans += 12 * i; cout << ans; } int main() { ios::sync_with_stdio(false); solve(); cout << "\n"; return 0; } ```
#include <bits/stdc++.h> using namespace std; unsigned long long n, ans = 1; int main() { cin >> n; for (unsigned long long i = 2; i <= n; i++) ans += (i - 1) * 12; cout << ans; }
### Prompt In Cpp, your task is to solve the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; unsigned long long n, ans = 1; int main() { cin >> n; for (unsigned long long i = 2; i <= n; i++) ans += (i - 1) * 12; cout << ans; } ```
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); long long n; cin >> n; long long m = n - 1, ans = 0; for (long long k = m; k >= 1; k--) { long long j = 12 * k; ans += j; } cout << ans + 1; return 0; }
### Prompt Your challenge is to write a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); long long n; cin >> n; long long m = n - 1, ans = 0; for (long long k = m; k >= 1; k--) { long long j = 12 * k; ans += j; } cout << ans + 1; return 0; } ```
#include <bits/stdc++.h> int main() { long long int n; scanf("%I64d", &n); printf("%I64d", 1 + n * (n - 1) * 6); return 0; }
### Prompt Create a solution in cpp for the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { long long int n; scanf("%I64d", &n); printf("%I64d", 1 + n * (n - 1) * 6); return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n = 0; scanf("%d", &n); int s = 0, nr = 0; s = 1; for (int i = 2; i <= n; i++) nr += 12, s += nr; printf("%d\n", s); return 0; }
### Prompt Please formulate a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n = 0; scanf("%d", &n); int s = 0, nr = 0; s = 1; for (int i = 2; i <= n; i++) nr += 12, s += nr; printf("%d\n", s); return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; cout << 6 * a * (a - 1) + 1 << endl; return 0; }
### Prompt Please create a solution in CPP to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; cout << 6 * a * (a - 1) + 1 << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int a, result = 1; cin >> a; for (int i = 1; i <= a; i++) { result = result + (i - 1) * 12; } cout << result; }
### Prompt Please formulate a cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int a, result = 1; cin >> a; for (int i = 1; i <= a; i++) { result = result + (i - 1) * 12; } cout << result; } ```
#include <bits/stdc++.h> #pragma hdrstop using namespace std; #pragma argsused int main(int argc, char* argv[]) { int a, b = 1; cin >> a; for (int i = 1; i < a; i++) { b += 12 * i; } cout << b << endl; return 0; }
### Prompt Please provide a Cpp coded solution to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> #pragma hdrstop using namespace std; #pragma argsused int main(int argc, char* argv[]) { int a, b = 1; cin >> a; for (int i = 1; i < a; i++) { b += 12 * i; } cout << b << endl; return 0; } ```
#include <bits/stdc++.h> int main() { int n; scanf("%d\n", &n); printf("%d\n", n * 6 * (n - 1) + 1); }
### Prompt In cpp, your task is to solve the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { int n; scanf("%d\n", &n); printf("%d\n", n * 6 * (n - 1) + 1); } ```
#include <bits/stdc++.h> using namespace std; inline int read() { int a = 0, f = 1; char ch = getchar(); for (; !isdigit(ch); ch = getchar()) if (ch == '-') f = -1; for (; isdigit(ch); ch = getchar()) a = (a << 3) + (a << 1) + ch - '0'; return a * f; } const int mod = 1e9 + 7; const int N = 1e6 + 5; signed main() { int n = read(); printf("%d\n", 1 + 12 * ((n * (n - 1)) >> 1)); return 0; }
### Prompt In Cpp, your task is to solve the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; inline int read() { int a = 0, f = 1; char ch = getchar(); for (; !isdigit(ch); ch = getchar()) if (ch == '-') f = -1; for (; isdigit(ch); ch = getchar()) a = (a << 3) + (a << 1) + ch - '0'; return a * f; } const int mod = 1e9 + 7; const int N = 1e6 + 5; signed main() { int n = read(); printf("%d\n", 1 + 12 * ((n * (n - 1)) >> 1)); return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[21111]; a[1] = 1; for (int i = 2; i <= n; i++) { a[i] = a[i - 1] + ((i - 1) * 2 - 1) * 3 + i * 6 - 3; } cout << a[n] << endl; return 0; }
### Prompt Your challenge is to write a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[21111]; a[1] = 1; for (int i = 2; i <= n; i++) { a[i] = a[i - 1] + ((i - 1) * 2 - 1) * 3 + i * 6 - 3; } cout << a[n] << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; long long tr(long long x) { return x * (x + 1) / 2; } int main() { long long n; cin >> n; cout << tr(n * 2 + n - 2) + 3 * tr(n - 1) << endl; return 0; }
### Prompt Develop a solution in cpp to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; long long tr(long long x) { return x * (x + 1) / 2; } int main() { long long n; cin >> n; cout << tr(n * 2 + n - 2) + 3 * tr(n - 1) << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; long long s = 0; cin >> n; n--; s = 1; for (int i = 1; i <= n; i++) { s = s + 12 * i; } cout << s; return 0; }
### Prompt Please formulate a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; long long s = 0; cin >> n; n--; s = 1; for (int i = 1; i <= n; i++) { s = s + 12 * i; } cout << s; return 0; } ```
#include <bits/stdc++.h> using namespace std; const int intmax = 0x3f3f3f3f; const long long lldmax = 0x3f3f3f3f3f3f3f3fll; double eps = 1e-8; template <class T> inline void checkmin(T &a, T b) { if (b < a) a = b; } template <class T> inline void checkmax(T &a, T b) { if (b > a) a = b; } template <class T> inline T sqr(T x) { return x * x; } template <class T> inline T lowbit(T n) { return (n ^ (n - 1)) & n; } template <class T> inline int countbit(T n) { return (n == 0) ? 0 : (1 + countbit(n & (n - 1))); } template <class T> inline T checkmod(T n, T m) { return (n % m + m) % m; } template <class T> inline T gcd(T a, T b) { if (a < 0) return gcd(-a, b); if (b < 0) return gcd(a, -b); return (b == 0) ? a : gcd(b, a % b); } template <class T> inline T euclid(T a, T b, T &x, T &y) { if (a < 0) { T d = euclid(-a, b, x, y); x = -x; return d; } if (b < 0) { T d = euclid(a, -b, x, y); y = -y; return d; } if (b == 0) { x = 1; y = 0; return a; } else { T d = euclid(b, a % b, x, y); T t = x; x = y; y = t - (a / b) * y; return d; } } template <class T> inline int dblcmp(T a, const T b) { a -= b; return a > eps ? 1 : (a < -eps ? -1 : 0); } template <class T> inline int sgn(T a) { return a > eps ? 1 : (a < -eps ? -1 : 0); } const int N = 1100; int main() { long long a = 0, sum = 1; long long n; cin >> n; for (int i = 1; i < n; ++i) { a += 12; sum += a; } cout << sum << endl; return 0; }
### Prompt Please create a solution in CPP to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; const int intmax = 0x3f3f3f3f; const long long lldmax = 0x3f3f3f3f3f3f3f3fll; double eps = 1e-8; template <class T> inline void checkmin(T &a, T b) { if (b < a) a = b; } template <class T> inline void checkmax(T &a, T b) { if (b > a) a = b; } template <class T> inline T sqr(T x) { return x * x; } template <class T> inline T lowbit(T n) { return (n ^ (n - 1)) & n; } template <class T> inline int countbit(T n) { return (n == 0) ? 0 : (1 + countbit(n & (n - 1))); } template <class T> inline T checkmod(T n, T m) { return (n % m + m) % m; } template <class T> inline T gcd(T a, T b) { if (a < 0) return gcd(-a, b); if (b < 0) return gcd(a, -b); return (b == 0) ? a : gcd(b, a % b); } template <class T> inline T euclid(T a, T b, T &x, T &y) { if (a < 0) { T d = euclid(-a, b, x, y); x = -x; return d; } if (b < 0) { T d = euclid(a, -b, x, y); y = -y; return d; } if (b == 0) { x = 1; y = 0; return a; } else { T d = euclid(b, a % b, x, y); T t = x; x = y; y = t - (a / b) * y; return d; } } template <class T> inline int dblcmp(T a, const T b) { a -= b; return a > eps ? 1 : (a < -eps ? -1 : 0); } template <class T> inline int sgn(T a) { return a > eps ? 1 : (a < -eps ? -1 : 0); } const int N = 1100; int main() { long long a = 0, sum = 1; long long n; cin >> n; for (int i = 1; i < n; ++i) { a += 12; sum += a; } cout << sum << endl; return 0; } ```
#include <bits/stdc++.h> int main(int argc, char **argv) { long long int n; std::cin >> n; long long int result = (n * 3LL - 2LL) * (n * 3LL - 1LL) / 2LL + 3LL * n * (n - 1LL) / 2LL; std::cout << result; return 0; }
### Prompt In cpp, your task is to solve the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main(int argc, char **argv) { long long int n; std::cin >> n; long long int result = (n * 3LL - 2LL) * (n * 3LL - 1LL) / 2LL + 3LL * n * (n - 1LL) / 2LL; std::cout << result; return 0; } ```
#include <bits/stdc++.h> int main() { int a[19000], b, c, n; a[1] = 1; int i = 2; while (i <= 18257) { a[i] = a[i - 1] + 12 * (i - 1); i++; } while (scanf("%d", &n) != EOF) { printf("%d\n", a[n]); } return 0; }
### Prompt Please formulate a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { int a[19000], b, c, n; a[1] = 1; int i = 2; while (i <= 18257) { a[i] = a[i - 1] + 12 * (i - 1); i++; } while (scanf("%d", &n) != EOF) { printf("%d\n", a[n]); } return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n) { int s; s = n * (n - 1) * 6 + 1; cout << s << endl; } return 0; }
### Prompt Develop a solution in cpp to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n) { int s; s = n * (n - 1) * 6 + 1; cout << s << endl; } return 0; } ```
#include <bits/stdc++.h> int main() { int n; scanf("%d", &n); printf("%d\n", 6 * n * (n - 1) + 1); return 0; }
### Prompt Please create a solution in cpp to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { int n; scanf("%d", &n); printf("%d\n", 6 * n * (n - 1) + 1); return 0; } ```
#include <bits/stdc++.h> using namespace std; int triangle(long long n) { if (n == 1) return 1; else return n + triangle(n - 1); } int heart(long long a) { if (a == 1) return 1; else return (6 * (a - 1)) + heart(a - 1); } int balls(long long a) { if (a == 1) return 1; else return heart(a) + (triangle(a - 1) * 6); } int main() { long long a, b; cin >> a; b = balls(a); cout << b; return 0; }
### Prompt Your challenge is to write a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int triangle(long long n) { if (n == 1) return 1; else return n + triangle(n - 1); } int heart(long long a) { if (a == 1) return 1; else return (6 * (a - 1)) + heart(a - 1); } int balls(long long a) { if (a == 1) return 1; else return heart(a) + (triangle(a - 1) * 6); } int main() { long long a, b; cin >> a; b = balls(a); cout << b; return 0; } ```
#include <bits/stdc++.h> int main() { int x = 0, n, ans = 1; scanf("%d", &n); for (int i = 1; i < n; i++) x += 12, ans += x; printf("%d\n", ans); return 0; }
### Prompt Create a solution in Cpp for the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { int x = 0, n, ans = 1; scanf("%d", &n); for (int i = 1; i < n; i++) x += 12, ans += x; printf("%d\n", ans); return 0; } ```
#include <bits/stdc++.h> #pragma hdrstop using namespace std; #pragma argsused int main(int argc, char* argv[]) { int a, b = 1; cin >> a; for (int i = 1; i < a; i++) { b += 12 * i; } cout << b << endl; return 0; }
### Prompt Create a solution in cpp for the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> #pragma hdrstop using namespace std; #pragma argsused int main(int argc, char* argv[]) { int a, b = 1; cin >> a; for (int i = 1; i < a; i++) { b += 12 * i; } cout << b << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n, k = 1, a[100000]; scanf("%d", &n); a[1] = 1; while (k < n) { k++; a[k] = a[k - 1] + 12 * (k - 1); } printf("%d\n", a[k]); return 0; }
### Prompt Your challenge is to write a cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n, k = 1, a[100000]; scanf("%d", &n); a[1] = 1; while (k < n) { k++; a[k] = a[k - 1] + 12 * (k - 1); } printf("%d\n", a[k]); return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n) { int r = 1; for (int i = 0, j = 0; i < n; i++, j += 2) r += j * 6; cout << r << endl; } return 0; }
### Prompt Generate a cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n) { int r = 1; for (int i = 0, j = 0; i < n; i++, j += 2) r += j * 6; cout << r << endl; } return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; long long result; cin >> n; result = 6 * n * (n - 1) + 1; cout << result; return 0; }
### Prompt Your task is to create a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; long long result; cin >> n; result = 6 * n * (n - 1) + 1; cout << result; return 0; } ```
#include <bits/stdc++.h> int n; int main() { scanf("%d", &n); printf("%d", (2 * n - 1) * (2 * n - 1) + 4 * (n - 1) * n / 2); }
### Prompt Please provide a Cpp coded solution to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int n; int main() { scanf("%d", &n); printf("%d", (2 * n - 1) * (2 * n - 1) + 4 * (n - 1) * n / 2); } ```
#include <bits/stdc++.h> using namespace std; bool cmp(const int &a, const int &b) { return a > b; } int main() { cin.sync_with_stdio(0); cin.tie(0); cin.exceptions(cin.failbit); long long int n; cin >> n; cout << (6 * (n) * (n - 1)) + 1 << endl; return 0; }
### Prompt Construct a Cpp code solution to the problem outlined: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; bool cmp(const int &a, const int &b) { return a > b; } int main() { cin.sync_with_stdio(0); cin.tie(0); cin.exceptions(cin.failbit); long long int n; cin >> n; cout << (6 * (n) * (n - 1)) + 1 << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; long long arr[(int)1e6] = {}; int main() { int n; cin >> n; arr[0] = 1, arr[1] = 13; for (int i = 1; i <= n; i++) { arr[i] = arr[i - 1] + (12 * i); } cout << arr[n - 1]; return 0; }
### Prompt Your task is to create a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; long long arr[(int)1e6] = {}; int main() { int n; cin >> n; arr[0] = 1, arr[1] = 13; for (int i = 1; i <= n; i++) { arr[i] = arr[i - 1] + (12 * i); } cout << arr[n - 1]; return 0; } ```
#include <bits/stdc++.h> #pragma comment(linker, "/STACK:66777216") using namespace std; int nomalDay[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int leapDay[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; const int OHT = 100100; const int TH = 1010; const int FH = 510; const int MAXINF = (2 << 26); const int MININF = (~(2 << 26)); const double PI = 3.1415926535897932384626433832795; struct node { int x, y; }; inline bool upcmp(int a, int b) { return a < b; } inline bool downcmp(int a, int b) { return a > b; } inline int getbits(int n) { return n == 0 ? 1 : (int)log10(n) + 1; } int num[100000]; int main() { long long a, res; cin >> a; res = 12 * (a - 1) + ((a - 1) * (a - 2) * 12) / 2; cout << res + 1 << endl; return 0; }
### Prompt Please formulate a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> #pragma comment(linker, "/STACK:66777216") using namespace std; int nomalDay[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int leapDay[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; const int OHT = 100100; const int TH = 1010; const int FH = 510; const int MAXINF = (2 << 26); const int MININF = (~(2 << 26)); const double PI = 3.1415926535897932384626433832795; struct node { int x, y; }; inline bool upcmp(int a, int b) { return a < b; } inline bool downcmp(int a, int b) { return a > b; } inline int getbits(int n) { return n == 0 ? 1 : (int)log10(n) + 1; } int num[100000]; int main() { long long a, res; cin >> a; res = 12 * (a - 1) + ((a - 1) * (a - 2) * 12) / 2; cout << res + 1 << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { long long int m, s = 1; cin >> m; for (long int i = 0; i < m; i++) { s = s + 12 * i; } cout << s << endl; }
### Prompt Please provide a CPP coded solution to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long int m, s = 1; cin >> m; for (long int i = 0; i < m; i++) { s = s + 12 * i; } cout << s << endl; } ```
#include <bits/stdc++.h> FILE *in, *out; int main() { int i, a, b, c = 1, say = 0, q; long long n = 1; char dixi[100000]; scanf("%d", &a); if (a == 1) { printf("1"); return 0; } for (i = 1; i < a; i++) n += 12 * i; printf("%I64d", n); return 0; }
### Prompt Please provide a cpp coded solution to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> FILE *in, *out; int main() { int i, a, b, c = 1, say = 0, q; long long n = 1; char dixi[100000]; scanf("%d", &a); if (a == 1) { printf("1"); return 0; } for (i = 1; i < a; i++) n += 12 * i; printf("%I64d", n); return 0; } ```
#include <bits/stdc++.h> using namespace std; signed main() { long long int n; cin >> n; cout << 6 * (n) * (n - 1) + 1 << "\n"; return 0; }
### Prompt Create a solution in Cpp for the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; signed main() { long long int n; cin >> n; cout << 6 * (n) * (n - 1) + 1 << "\n"; return 0; } ```
#include <bits/stdc++.h> using namespace std; long long a; string b; int main() { cin >> a; cout << 6 * a * (a - 1) + 1 << endl; return 0; }
### Prompt Please formulate a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; long long a; string b; int main() { cin >> a; cout << 6 * a * (a - 1) + 1 << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int toInt(string s) { int r = 0; istringstream sin(s); sin >> r; return r; } long long toInt64(string s) { long long r = 0; istringstream sin(s); sin >> r; return r; } double toDouble(string s) { double r = 0; istringstream sin(s); sin >> r; return r; } string toString(long long n) { string s, s1; while (n / 10 > 0) { s += (char)((n % 10) + 48); n /= 10; } s += (char)((n % 10) + 48); n /= 10; s1 = s; for (long long i = 0; i < s.length(); i++) s1[(s.length() - 1) - i] = s[i]; return s1; } bool isUpperCase(char c) { return c >= 'A' && c <= 'Z'; } bool isLowerCase(char c) { return c >= 'a' && c <= 'z'; } bool isLetter(char c) { return c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z'; } bool isDigit(char c) { return c >= '0' && c <= '9'; } char toLowerCase(char c) { return (isUpperCase(c)) ? (c + 32) : c; } char toUpperCase(char c) { return (isLowerCase(c)) ? (c - 32) : c; } int main() { ios::sync_with_stdio(0); int n; cin >> n; long long count = 1; int a = 12; for (long long i = 0; i < n - 1; i++) { count += a; a += 12; } cout << count << endl; }
### Prompt Please provide a CPP coded solution to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int toInt(string s) { int r = 0; istringstream sin(s); sin >> r; return r; } long long toInt64(string s) { long long r = 0; istringstream sin(s); sin >> r; return r; } double toDouble(string s) { double r = 0; istringstream sin(s); sin >> r; return r; } string toString(long long n) { string s, s1; while (n / 10 > 0) { s += (char)((n % 10) + 48); n /= 10; } s += (char)((n % 10) + 48); n /= 10; s1 = s; for (long long i = 0; i < s.length(); i++) s1[(s.length() - 1) - i] = s[i]; return s1; } bool isUpperCase(char c) { return c >= 'A' && c <= 'Z'; } bool isLowerCase(char c) { return c >= 'a' && c <= 'z'; } bool isLetter(char c) { return c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z'; } bool isDigit(char c) { return c >= '0' && c <= '9'; } char toLowerCase(char c) { return (isUpperCase(c)) ? (c + 32) : c; } char toUpperCase(char c) { return (isLowerCase(c)) ? (c - 32) : c; } int main() { ios::sync_with_stdio(0); int n; cin >> n; long long count = 1; int a = 12; for (long long i = 0; i < n - 1; i++) { count += a; a += 12; } cout << count << endl; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int v = 6 * n * (n - 1); cout << v + 1; return 0; }
### Prompt Your challenge is to write a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int v = 6 * n * (n - 1); cout << v + 1; return 0; } ```
#include <bits/stdc++.h> using namespace std; int s[18257 + 1]; int main() { memset(s, 0, sizeof(s)); s[1] = 1; for (int i = 2; i <= 18257; i++) { s[i] = (2 * i - 3) * 6 + 6; } int a; scanf("%d", &a); if (a == 1) { cout << s[1] << endl; } else { int sum = 0; for (int i = 1; i <= a; i++) { sum += s[i]; } cout << sum << endl; } return 0; }
### Prompt Please create a solution in CPP to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int s[18257 + 1]; int main() { memset(s, 0, sizeof(s)); s[1] = 1; for (int i = 2; i <= 18257; i++) { s[i] = (2 * i - 3) * 6 + 6; } int a; scanf("%d", &a); if (a == 1) { cout << s[1] << endl; } else { int sum = 0; for (int i = 1; i <= a; i++) { sum += s[i]; } cout << sum << endl; } return 0; } ```
#include <bits/stdc++.h> int main() { int a, b, c, d, sum = 1; scanf("%d", &a); if (a == 1) printf("1"); else { for (b = 1; b < a; b++) sum += (b * 12); printf("%d", sum); } }
### Prompt Please provide a cpp coded solution to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { int a, b, c, d, sum = 1; scanf("%d", &a); if (a == 1) printf("1"); else { for (b = 1; b < a; b++) sum += (b * 12); printf("%d", sum); } } ```
#include <bits/stdc++.h> using namespace std; int main(void) { int A, R; cin >> A; R = (6 * A) * (A - 1) + 1; cout << R << endl; return 0; }
### Prompt Construct a cpp code solution to the problem outlined: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main(void) { int A, R; cin >> A; R = (6 * A) * (A - 1) + 1; cout << R << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int a; while (scanf("%d", &a) != EOF) { long long ans(1), dx(3); for (int i = 2; i <= a; ++i) { ans += 6 * dx - 6; dx += 2; } printf("%I64d\n", ans); } }
### Prompt In cpp, your task is to solve the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int a; while (scanf("%d", &a) != EOF) { long long ans(1), dx(3); for (int i = 2; i <= a; ++i) { ans += 6 * dx - 6; dx += 2; } printf("%I64d\n", ans); } } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; scanf("%d", &n); int ret = n * (n - 1) / 2; ret = 1 + 12 * ret; printf("%d\n", ret); return 0; }
### Prompt Your challenge is to write a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; scanf("%d", &n); int ret = n * (n - 1) / 2; ret = 1 + 12 * ret; printf("%d\n", ret); return 0; } ```
#include <bits/stdc++.h> using namespace std; const int MOD = 1e9 + 7; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); long long amount[18258]; amount[1] = 1; for (int i = 2; i < 18258; i++) { amount[i] = amount[i - 1] + (i - 1) * 12; } int n; while (cin >> n) { cout << amount[n] << endl; } return 0; }
### Prompt Please formulate a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; const int MOD = 1e9 + 7; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); long long amount[18258]; amount[1] = 1; for (int i = 2; i < 18258; i++) { amount[i] = amount[i - 1] + (i - 1) * 12; } int n; while (cin >> n) { cout << amount[n] << endl; } return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << 6 * n * n - 6 * n + 1; return 0; }
### Prompt Your challenge is to write a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << 6 * n * n - 6 * n + 1; return 0; } ```
#include <bits/stdc++.h> using namespace std; int star(long long int n); int main() { long long int n; cin >> n; cout << star(n) << endl; return 0; } int star(long long int n) { if (n == 1) return 1; return ((n * 12) - 12) + star(n - 1); }
### Prompt In CPP, your task is to solve the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int star(long long int n); int main() { long long int n; cin >> n; cout << star(n) << endl; return 0; } int star(long long int n) { if (n == 1) return 1; return ((n * 12) - 12) + star(n - 1); } ```
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false), cin.tie(0); ; int i, a; long long A[18258]; A[1] = 1; for (i = 2; i < 18258; i++) A[i] = A[i - 1] + 12 * (i - 1); cin >> a; cout << A[a]; }
### Prompt Develop a solution in Cpp to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false), cin.tie(0); ; int i, a; long long A[18258]; A[1] = 1; for (i = 2; i < 18258; i++) A[i] = A[i - 1] + 12 * (i - 1); cin >> a; cout << A[a]; } ```
#include <bits/stdc++.h> int main() { int a, b; scanf("%d", &a); b = 1 + 6 * a * (a - 1); printf("%d\n", b); return 0; }
### Prompt Create a solution in CPP for the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { int a, b; scanf("%d", &a); b = 1 + 6 * a * (a - 1); printf("%d\n", b); return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; printf("%d", 6 * x * (x - 1) + 1); }
### Prompt Create a solution in Cpp for the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; printf("%d", 6 * x * (x - 1) + 1); } ```
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; long long ans = 1; long long tambah = 3; for (int i = 1; i < n; i++) { ans += (tambah * 6); ans -= 6; tambah += 2; } cout << ans << endl; return 0; }
### Prompt Please formulate a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; long long ans = 1; long long tambah = 3; for (int i = 1; i < n; i++) { ans += (tambah * 6); ans -= 6; tambah += 2; } cout << ans << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; int r = 0; for (int i = 1; i < a; i++) { r += i; } cout << 1 + r * 12 << endl; return 0; }
### Prompt Please create a solution in Cpp to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; int r = 0; for (int i = 1; i < a; i++) { r += i; } cout << 1 + r * 12 << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; void solve() { int a, ans = 1; cin >> a; for (int i = 1; i <= a; ++i) ans += (i - 1) * 12; cout << ans << "\n"; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t = 1; while (t--) solve(); return 0; }
### Prompt Construct a Cpp code solution to the problem outlined: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; void solve() { int a, ans = 1; cin >> a; for (int i = 1; i <= a; ++i) ans += (i - 1) * 12; cout << ans << "\n"; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t = 1; while (t--) solve(); return 0; } ```
#include <bits/stdc++.h> int main() { int n, count = 1; scanf("%d", &n); if (n >= 2) count += 12; for (int i = 3; i <= n; i++) { count += 12 * (i - 2) + 12; } printf("%d", count); }
### Prompt Generate a cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { int n, count = 1; scanf("%d", &n); if (n >= 2) count += 12; for (int i = 3; i <= n; i++) { count += 12 * (i - 2) + 12; } printf("%d", count); } ```
#include <bits/stdc++.h> using namespace std; int a[19000]; int main() { int ans = 1; int n; cin >> n; int cur = 12; for (int i = 1; i < n; i++) { ans += cur; cur += 12; } cout << ans; return 0; }
### Prompt Please formulate a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int a[19000]; int main() { int ans = 1; int n; cin >> n; int cur = 12; for (int i = 1; i < n; i++) { ans += cur; cur += 12; } cout << ans; return 0; } ```
#include <bits/stdc++.h> const double eps = 1e-10; using namespace std; int dblcmp(double x) { if (fabs(x) < eps) return 0; return x > 0 ? 1 : -1; } int main() { int i, j, k, n; int a, b; string s; while (cin >> a) { k = 1; for (i = 1; i < a; ++i) k += 12 * i; cout << k << endl; } return 0; }
### Prompt Your challenge is to write a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> const double eps = 1e-10; using namespace std; int dblcmp(double x) { if (fabs(x) < eps) return 0; return x > 0 ? 1 : -1; } int main() { int i, j, k, n; int a, b; string s; while (cin >> a) { k = 1; for (i = 1; i < a; ++i) k += 12 * i; cout << k << endl; } return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << 6 * n * (n - 1) + 1 << endl; return 0; }
### Prompt Your task is to create a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << 6 * n * (n - 1) + 1 << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << n * 6 * (n - 1) + 1 << endl; return 0; }
### Prompt Construct a cpp code solution to the problem outlined: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << n * 6 * (n - 1) + 1 << endl; return 0; } ```
#include <bits/stdc++.h> int main() { long long a, x = 1; scanf("%lld", &a); for (long long int i = 1; i <= a; i++) x += 9 * (i - 1) + 3 * (i - 1); printf("%lld\n", x); }
### Prompt Please formulate a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { long long a, x = 1; scanf("%lld", &a); for (long long int i = 1; i <= a; i++) x += 9 * (i - 1) + 3 * (i - 1); printf("%lld\n", x); } ```
#include <bits/stdc++.h> int main() { int i, n, sum = 13; scanf("%d", &n); if (n == 1) { printf("%d", 1); return 0; } if (n == 2) { printf("%d", 13); return 0; } for (i = 3; i <= n; i++) { sum = sum + (2 * i - 2) * 6; } printf("%d", sum); return 0; }
### Prompt Develop a solution in Cpp to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int main() { int i, n, sum = 13; scanf("%d", &n); if (n == 1) { printf("%d", 1); return 0; } if (n == 2) { printf("%d", 13); return 0; } for (i = 3; i <= n; i++) { sum = sum + (2 * i - 2) * 6; } printf("%d", sum); return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; cout << 1 + 12 * n * (n - 1) / 2 << endl; }
### Prompt In Cpp, your task is to solve the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; cout << 1 + 12 * n * (n - 1) / 2 << endl; } ```
#include <bits/stdc++.h> using namespace std; int n; int main() { cin >> n; int a = 1 + 12 * (n * (n - 1) / 2); cout << a; return 0; }
### Prompt Please provide a CPP coded solution to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int n; int main() { cin >> n; int a = 1 + 12 * (n * (n - 1) / 2); cout << a; return 0; } ```
#include <bits/stdc++.h> template <typename T> T inline SQR(const T &a) { return a * a; } template <typename T> T inline ABS(const T &a) { return a < 0 ? -a : a; } const double EPS = 1e-9; inline int SGN(double a) { return ((a > EPS) ? (1) : ((a < -EPS) ? (-1) : (0))); } inline int CMP(double a, double b) { return SGN(a - b); } using namespace std; int main(int argc, char *argv[]) { ios::sync_with_stdio(false); long long n; cin >> n; cout << (6LL * n * n - 6LL * n + 1LL) << "\n"; return 0; }
### Prompt Develop a solution in CPP to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> template <typename T> T inline SQR(const T &a) { return a * a; } template <typename T> T inline ABS(const T &a) { return a < 0 ? -a : a; } const double EPS = 1e-9; inline int SGN(double a) { return ((a > EPS) ? (1) : ((a < -EPS) ? (-1) : (0))); } inline int CMP(double a, double b) { return SGN(a - b); } using namespace std; int main(int argc, char *argv[]) { ios::sync_with_stdio(false); long long n; cin >> n; cout << (6LL * n * n - 6LL * n + 1LL) << "\n"; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int depth, solution = 1; cin >> depth; for (int size = 12; depth > 1; --depth, size += 12) solution += size; cout << solution << "\n"; return 0; }
### Prompt Please formulate a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int depth, solution = 1; cin >> depth; for (int size = 12; depth > 1; --depth, size += 12) solution += size; cout << solution << "\n"; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; if (a == 1LL) { cout << 1; return 0; } --a; long long res = (3LL * a + 2LL) * (3LL * a + 1LL) / 2LL; res += 3LL * a * (a + 1LL) / 2LL; cout << res << endl; return 0; }
### Prompt In cpp, your task is to solve the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; if (a == 1LL) { cout << 1; return 0; } --a; long long res = (3LL * a + 2LL) * (3LL * a + 1LL) / 2LL; res += 3LL * a * (a + 1LL) / 2LL; cout << res << endl; return 0; } ```
#include <bits/stdc++.h> int n; int main() { scanf("%d", &n); printf("%d", 1 + 6 * n * ~-n); }
### Prompt Your challenge is to write a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> int n; int main() { scanf("%d", &n); printf("%d", 1 + 6 * n * ~-n); } ```
#include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; cout << (1 + 12 * a * (a - 1) / 2) << endl; }
### Prompt Please create a solution in CPP to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; cout << (1 + 12 * a * (a - 1) / 2) << endl; } ```
#include <bits/stdc++.h> using namespace std; const long long mod = 1000000007; const int inf = 0x3f3f3f3f; const long long INF = 0x3f3f3f3f3f3f3f3f; long long qpow(long long a, long long b) { long long s = 1; while (b > 0) { if (b % 2 == 1) { s = s * a; } a = a * a; b = b >> 1; } return s; } long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; } int main() { long long n, ans = 1; cin >> n; if (n == 1) { cout << 1; } else { long long t = 1; for (int i = 1; i < n; i++) { ans = ans + t * 6 + 6; t += 2; } cout << ans << '\n'; } return 0; }
### Prompt Please provide a cpp coded solution to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; const long long mod = 1000000007; const int inf = 0x3f3f3f3f; const long long INF = 0x3f3f3f3f3f3f3f3f; long long qpow(long long a, long long b) { long long s = 1; while (b > 0) { if (b % 2 == 1) { s = s * a; } a = a * a; b = b >> 1; } return s; } long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; } int main() { long long n, ans = 1; cin >> n; if (n == 1) { cout << 1; } else { long long t = 1; for (int i = 1; i < n; i++) { ans = ans + t * 6 + 6; t += 2; } cout << ans << '\n'; } return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; if (n == 1) cout << 1; else { long long res = 13, s = 12; for (int i = 3; i <= n; ++i) { s += 12; res += s; } cout << res; } return 0; }
### Prompt Construct a CPP code solution to the problem outlined: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; if (n == 1) cout << 1; else { long long res = 13, s = 12; for (int i = 3; i <= n; ++i) { s += 12; res += s; } cout << res; } return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << 6 * n * (n - 1) + 1; return 0; }
### Prompt Your task is to create a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << 6 * n * (n - 1) + 1; return 0; } ```
#include <bits/stdc++.h> using namespace std; int main() { long long n, m = 0; cin >> n; for (int i = 1; i < n; i++) { m += i; } if (n == 1) { cout << 1; return 0; } long long y = (2 * n + (n - 2)) * (2 * n + (n - 1)); y = y / 2; cout << y + 3 * m; }
### Prompt Generate a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long n, m = 0; cin >> n; for (int i = 1; i < n; i++) { m += i; } if (n == 1) { cout << 1; return 0; } long long y = (2 * n + (n - 2)) * (2 * n + (n - 1)); y = y / 2; cout << y + 3 * m; } ```
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; long long int ans = 0; for (long long int i = 0; i < n; i++) { ans += 12 * i; } cout << ans + 1; return 0; }
### Prompt Develop a solution in cpp to the problem described below: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; long long int ans = 0; for (long long int i = 0; i < n; i++) { ans += 12 * i; } cout << ans + 1; return 0; } ```
#include <bits/stdc++.h> using namespace std; int a, res, i, side, cnt; int main() { cin >> a; cnt = 0; if (a == 1) res = 1; else { res = 1; side = 1; for (i = 1; i < a; i++) { side += 3; res += side * 3; if (i > 1) res += cnt * 3; cnt++; } } cout << res << endl; return 0; }
### Prompt Generate a Cpp solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; int a, res, i, side, cnt; int main() { cin >> a; cnt = 0; if (a == 1) res = 1; else { res = 1; side = 1; for (i = 1; i < a; i++) { side += 3; res += side * 3; if (i > 1) res += cnt * 3; cnt++; } } cout << res << endl; return 0; } ```
#include <bits/stdc++.h> using namespace std; const long double PI = acos(-1); int main() { ios::sync_with_stdio(false); cin.tie(0); long long n; cin >> n; cout << 6 * n * (n - 1) + 1 << '\n'; return 0; }
### Prompt Please formulate a CPP solution to the following problem: <image> Input The input contains a single integer a (1 ≤ a ≤ 18257). Output Print a single integer output (1 ≤ output ≤ 2·109). Examples Input 2 Output 13 ### Response ```cpp #include <bits/stdc++.h> using namespace std; const long double PI = acos(-1); int main() { ios::sync_with_stdio(false); cin.tie(0); long long n; cin >> n; cout << 6 * n * (n - 1) + 1 << '\n'; return 0; } ```