output
stringlengths
52
181k
instruction
stringlengths
296
182k
#include <bits/stdc++.h> using namespace std; int a[18257 + 5] = {0, 1, 13, 37, 73}, n; int main() { cin >> n; for (int i = 5; i <= n; i++) { a[i] = a[i - 1] + (a[i - 1] - a[i - 2] + 12); } cout << a[n]; }
### 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 a[18257 + 5]...
#include <bits/stdc++.h> using namespace std; int main(int argc, char *argv[]) { int n; cin >> n; cout << 6 * (n * (n - 1)) + 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; int main(int arg...
#include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; cout << 6 * a * (a - 1) + 1 << 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> using namespace std; int main() { long lo...
#include <bits/stdc++.h> int main() { int n, t(0), r(1); std::cin >> n; for (int i(0); i < n; ++i) { r += t; t += 12; } std::cout << r << std::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> int main() { int n, t(0), r(1); s...
#include <bits/stdc++.h> #pragma comment(linker, "/STACK:260108864") using namespace std; int main() { int n; scanf("%d", &n); int res(1); int temp(1); while (--n) { res += temp * 12; ++temp; } printf("%d\n", res); 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> #pragma comment(linker, "/STACK:26010...
#include <bits/stdc++.h> int main() { int x; scanf("%d", &x); printf("%d\n", 6 * x * (x - 1) + 1); 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; scanf("%d", &x); ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << (n * (n - 1) * 6 + 1); 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 ...
#include <bits/stdc++.h> using namespace std; int n; int main() { cin >> n; cout << 6 * (n * (n - 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 n; int main(...
#include <bits/stdc++.h> using namespace std; const double EPS = 1e-9; const double INC_EPS = 1e-7; const int N = 1e5 + 5; int main() { int n; long long ans = 0, k = 2; cin >> n; for (int i = 2; i <= n; i++) { ans += k * 6; k += 2; } cout << ans + 1; 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; const double EPS = 1e-9;...
#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 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 ma...
#include <bits/stdc++.h> long long factorial(long long n) { if (n == 1) return 1; return n * factorial(n - 1); } long long max(long long a, long long b) { return (a > b ? a : b); } long long min(long long a, long long b) { return (a < b ? a : b); } using namespace std; void impossible() { long long n; cin >> n;...
### 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> long long factorial(long long n) { if (n ...
#include <bits/stdc++.h> using namespace std; long long n, ans = 1; int main() { cin >> n; for (int i = 2; i <= n; i++) { ans += ((i - 1) * 12); } cout << 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> using namespace std; long long n, ans = 1; ...
#include <bits/stdc++.h> using namespace std; int main() { long long int n, i, t(1); cin >> n; for (int i = 0; i < (int)n; i++) t += (12 * i); cout << t; }
### 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() { l...
#include <bits/stdc++.h> #pragma comment(linker, "/stack:64000000") using namespace std; int main() { long long out = 0, a, b; cin >> a; if (a == 1) out = 1; else { out = 1; b = 12; for (int i = 1; i < a; i++) { out += b; b += 12; } } cout << out; 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> #pragma comment(linker, "/stack:64000000")...
#include <bits/stdc++.h> using namespace std; long long star[18528]; int main() { long long i; long long k = 1, z = 4; long long a; star[1] = 1; for (i = 2; i <= 18527; i++) { star[i] = (z * (z + 1)) / 2 + 3 * k; k = k + i; z = z + 3; } cin >> a; cout << star[a] << 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 star[1...
#include <bits/stdc++.h> using namespace std; long long MOD = 1000000007; long long pw(long long a, long long b) { long long r = 1; while (b > 0) { if (b & 1) { r = (r * a) % MOD; } b = b >> 1; a = (a * a) % MOD; } return (r) % MOD; } int f[18259]; int main() { f[0] = 0; f[1] = 1; fo...
### 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; long l...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << n * (n - 1) * 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> using namespace std; int main()...
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int a; cin >> a; cout << 6 * a * (a - 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()...
#include <bits/stdc++.h> using namespace std; long long t; int main() { scanf("%d", &t); printf("%d", 6 * t * (t - 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; long long t; int...
#include <bits/stdc++.h> using namespace std; template <typename T, typename U> std::pair<T, U> operator+(const std::pair<T, U>& l, const std::pair<T, U>& r) { return {l.first + r.first, l.second + r.second}; } typedef void (*callback_function)(void); const long long ZERO = 0LL; const long long INF64 = 1e18; const lo...
### 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 <typename T, ty...
#include <bits/stdc++.h> long long estella(int n); using namespace std; long long b, a; int main() { cin >> a; cout << estella(a); return 0; } long long estella(int n) { if (n == 1) { b = 1; } else { b = 2 * (n - 1) * (n - 1) + 2 * n * n + 2 * n * n - 2 * n - 1; } return b; }
### 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> long long estella(int n); using namespace ...
#include <bits/stdc++.h> using namespace std; long long n; int sum = 1; int main() { cin >> n; for (int i = 1; i < n; i++) sum += i * 12; cout << sum; 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; long long n; int sum ...
#include <bits/stdc++.h> using namespace std; int main() { int n; scanf("%d", &n); printf("%d", 6 * n * (n - 1) + 1); }
### 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() { i...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << 6 * n * (n - 1) + 1; }
### 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 ma...
#include <bits/stdc++.h> using namespace std; int work(string s) { reverse((s).begin(), (s).end()); int ans = 0, p = 1; for (int i = s.length() - 1; i >= 0; i--) { ans += (s[i] - '0') * p; p *= 10; } return ans; } int main() { int a; cin >> a; long long ans = 1; for (int i = 2; i <= a; i++) { ...
### 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 work(string s) { r...
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << 6 * n * (n - 1) + 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() { l...
#include <bits/stdc++.h> using namespace std; const long long n = 2000000000; int main() { long long a; cin >> a; long long res = 1, deg = 2; for (long long i = 1; i < a; ++i) { res = (res + 6 * deg) % n; deg = (deg + 2) % n; } 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; const ...
#include <bits/stdc++.h> using namespace std; int n; long long f[100005]; int main() { scanf("%d", &n); f[1] = 1; for (int i = 2; i <= n; i++) f[i] = (i * 2 - 1) * 6 + f[i - 1] - 6; printf("%lld\n", f[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; int n; long long f[10000...
#include <bits/stdc++.h> using namespace std; int n, m, k, a[18257 + 7]; int main() { cin >> n; a[1] = 1; k = 12; for (int i = 2; i <= n; i++, k += 12) a[i] = a[i - 1] + k; cout << a[n]; 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 n,...
#include <bits/stdc++.h> using namespace std; int main() { int a, s = 1; cin >> a; for (int i = 1; i < a; i++) s += i * 12; cout << s; }
### 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() { i...
#include <bits/stdc++.h> using namespace std; int main() { unsigned long long num, x = 1, i; cin >> num; for (i = 1; i < num; i++) x = x + (12 * i); cout << x << 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()...
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; cout << 6 * n * (n - 1) + 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 ma...
#include <bits/stdc++.h> using namespace std; long long mod(long long x) { return ((x % 1000000009 + 1000000009) % 1000000009); } long long add(long long a, long long b) { return mod(mod(a) + mod(b)); } long long mult(long long a, long long b) { return mod(mod(a) * mod(b)); } long long modPow(long long a, long long b...
### 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; long long mod(long lo...
#include <bits/stdc++.h> using namespace std; int main() { int n, a = 12, b = 1; cin >> n; for (int i = 1; i < n; i++) { b += a; a += 12; } cout << b << 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() { int n,...
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int a, ans = 1, p = 0; cin >> a; if (a == 1) ans = 1; for (int i = 1; i < a; ++i) { p += 12; ans += p; } 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; int ma...
#include <bits/stdc++.h> using namespace std; int main() { long long a; 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 main() { long...
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << 6 * n * (n - 1) + 1 << endl; }
### 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...
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; cout << 6 * a * (a - 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> using namespace std; int main() { int a;...
#include <bits/stdc++.h> using namespace std; int n; int main() { cin >> n; cout << 6 * 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; int n; int main() { ...
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << (1ll + ((n - 1ll) * n * 6ll)) << 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> using namespace std; int main() { long lo...
#include <bits/stdc++.h> using namespace std; int a[200000]; int main() { int n, m, i; a[1] = 1; for (i = 2; i <= 18257; i++) a[i] = a[i - 1] + 12 * (i - 1); while (~scanf("%d", &n)) { printf("%d\n", a[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; int a[...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int res = 0; for (int i = 1; i < n; i++) res += i; int x = 2 * n - 1; for (int i = 1; i < n; i++) res += x + i; res *= 2; res += x; cout << res; 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() { i...
#include <bits/stdc++.h> using namespace std; int n, ans = 1; int main() { cin >> n; for (int i = 2; i <= n; ++i) ans += (i - 1) * 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 n, ans = 1; ...
#include <bits/stdc++.h> using namespace std; int main() { long long int number = 0; cin >> number; long long int answer = 1; for (int i = 2; i <= number; i++) answer = answer + 12 * (i - 1); cout << answer << 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 l...
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); long long int i, n, sum = 1; cin >> n; for (i = 1; i < n; i++) sum += 12 * i; cout << sum << 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() { ios:...
#include <bits/stdc++.h> using namespace std; void solve(void) { int N; long int s = 0; cin >> N; for (int i = 2; i <= N; i++) s += i - 1; cout << s * 6 * 2 + 1 << endl; } int main(int argc, char const *argv[]) { solve(); 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; void s...
#include <bits/stdc++.h> int in() { int r = 0, c; for (c = getchar(); c <= 32; c = getchar()) ; if (c == '-') return -in(); for (; c > 32; r = (r << 1) + (r << 3) + c - '0', c = getchar()) ; return r; } int main() { int N = in(); long long res = 1; for (int i = 2; i <= N; i++) { res = res + ...
### 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 in() { int r = 0, c; for (c = getchar...
#include <bits/stdc++.h> int main() { unsigned long long n, star_n; scanf("%I64u", &n); star_n = 6LL * n * (n - 1) + 1; printf("%I64u", star_n); 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> int main() { unsigned lon...
#include <bits/stdc++.h> using namespace std; static const double EPS = 1e-5; int num = 0; void star(int n) { if (n == 1) num++; if (n > 1) { num += 12 * (n - 1); star(n - 1); } } int main(int argc, const char* argv[]) { int a; cin >> a; star(a); cout << num; 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; static...
#include <bits/stdc++.h> using namespace std; int N; int main(void) { scanf("%d", &N); printf("%d\n", 6 * N * (N - 1) + 1); 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 N; int main(void) { ...
#include <bits/stdc++.h> using namespace std; int main() { long long a, b = 1, x = 0; cin >> a; a--; for (int k = 1; k <= a; k++) { x += 2; b += 6 * x; } cout << b; 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() { l...
#include <bits/stdc++.h> #pragma GCC target("avx2") #pragma GCC optimization("O3") #pragma GCC optimization("unroll-loops") using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int a, res = 1, s = 0; cin >> a; for (int i = 1; i < a; i++) { s += 12; res += s; } cout <<...
### 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 GCC target("avx2") ...
#include <bits/stdc++.h> using namespace std; int main() { int n, m = 1; cin >> n; for (int i = 1; i < n; i++) { m += (12 * i); } cout << m << endl; }
### 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() { i...
#include <bits/stdc++.h> using namespace std; int main() { int n, output = 1; cin >> n; if (n == 1) { cout << n; return 0; } else while (n > 1) { output += (n - 1) * 12; n--; } cout << output << 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()...
#include <bits/stdc++.h> int main() { long long a, b, c, sum; while (scanf("%I64d", &a) != EOF) { sum = 1; c = 12; for (b = 1; b < a; b++) { sum += c; c = c + 12; } printf("%I64d\n", sum); } }
### 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 a, b, c, sum; wh...
#include <bits/stdc++.h> int main() { int a; scanf("%d", &a); printf("%d", 1 + 6 * (a - 1) * a); 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 a; scanf("%d", &...
#include <bits/stdc++.h> using namespace std; int main() { unsigned long long int a, s = 0, i; cin >> a; for (i = 1; i <= a; i++) { s = s + i - 1; } cout << s * 12 + 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() { unsi...
#include <bits/stdc++.h> using namespace std; int main() { int a; scanf("%d", &a); printf("%I64d\n", 1 + (long long)a * (long long)(a - 1) * 6); 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 ...
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; long long int ans = 6 * a * (a - 1) + 1; cout << ans << 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 ...
#include <bits/stdc++.h> #pragma comment(linker, "/STACK:64000000") using namespace std; int a; int main() { cin >> a; int ans = 1; for (int i = 2; i <= a; i++) { ans += (2 * i - 2) * 6; } cout << ans << 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> #pragma comment(linker, "/STACK...
#include <bits/stdc++.h> inline int getInt() { int s; scanf("%d", &s); return s; } using namespace std; int main() { int ans = 1; int n = getInt(); for (int i = 0; i < (int)(n - 1); i++) { ans += ((i + 1) * 2 + 1) * 3; ans += ((i + 1) * 2 - 1) * 3; } printf("%d\n", ans); 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> inline int getInt() { int...
#include <bits/stdc++.h> using namespace std; int main() { long long i, j, k, l, n, m, p; while (cin >> n) { k = 0; for (i = 1; i <= n - 1; i++) { k += 12 * i; } k++; printf("%lld\n", k); } }
### 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() { l...
#include <bits/stdc++.h> using namespace std; long long res = 1; int main() { int n; cin >> n; for (int i = 1; i < n; ++i) { res += i * 12; } cout << res; 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; long l...
#include <bits/stdc++.h> using namespace std; int main() { int A; cin >> A; cout << 6 * A * (A - 1) + 1 << 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> using namespace std; int main() { int A; ...
#include <bits/stdc++.h> using namespace std; int main() { int n, s, i; cin >> n; s = 1; for (i = 2; i <= n; i++) s += (2 * i - 1) * 6 - 6; cout << s; cin.get(); cin.get(); }
### 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() { i...
#include <bits/stdc++.h> using namespace std; int main() { long long int a = 0; cin >> a; cout << 6 * a * (a - 1) + 1 << "\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> using namespace std; int ma...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; n--; int sum = 1; for (int i = 1; i <= n; i++) sum += 12 * i; cout << sum; 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; ...
#include <bits/stdc++.h> using namespace std; int main() { long long int n, ans = 1, k; cin >> n; ans = 3 * n - 2; ans = (ans * (ans + 1)) / 2; k = 3 * (n * (n - 1)) / 2; cout << k + ans; }
### 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()...
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << 1 + 6 * n * (n - 1); }
### 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 ma...
#include <bits/stdc++.h> using namespace std; int main() { int a; int x; cin >> a; x = 6 * a * (a - 1) + 1; cout << x << 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 ma...
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; int output = 0; int an = 12 * (a - 1); output = an / 2 * a; cout << output + 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()...
#include <bits/stdc++.h> int main() { int n; while (scanf("%d", &n) != EOF) { printf("%d\n", 6 * n * (n - 1) + 1); } }
### 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 n; whi...
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << (long long)(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> using namespace std; int main() { l...
#include <bits/stdc++.h> using namespace std; int main() { int n, res = 0; cin >> n; for (int i = n; i >= 2; i--) res += (12 * (i - 1)); res += 1; cout << res << 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> using namespace std; int main() { int n, ...
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; long long int ans = ((n - 1) * (n)) / 2; ans *= 12; ans++; cout << ans << 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()...
#include <bits/stdc++.h> using namespace std; int main() { int a, ans = 1; cin >> a; for (int i = 0; i < a; i++) { ans += i * 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 main() { i...
#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; 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() { int a,...
#include <bits/stdc++.h> using namespace std; inline bool ascending(int i, int j) { return (i < j); } inline bool descending(int i, int j) { return (i > j); } const int MN = (1e5) + 10; int comp(const void *a, const void *b) { return (*(int *)a - *(int *)b); } bool cmp(int a, int b) { return a > b; } int main() { int...
### 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 bool ascending...
#include <bits/stdc++.h> using namespace std; 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> using namespace std; int main() { i...
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; cout << 6 * n * (n - 1) + 1 << "\n"; } int main() { ios::sync_with_stdio(0); cin.tie(0); solve(); 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; void solve() { int n...
#include <bits/stdc++.h> int main() { int a, n = 1; scanf("%d", &a); for (int i = 1; i < a; i++) n += 12 * i; printf("%d", 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> int main() { int a, n = 1...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 1 + 4; map<string, string> maap; vector<int> circle; bool vis[N]; int parent[N]; int chk[N]; int color[N]; int tim[2][N]; int dis[N]; int position[N]; vector<int> adj[N]; vector<int> adj1[N]; vector<int> graph[N]; bool has_cycle; int maxd...
### 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; using ll = long long; ...
#include <bits/stdc++.h> using namespace std; int main() { string a, b; long long s, d, i, n, t; cin >> n; t = 1; d = 12; if (n == 1) { cout << 1; return 0; } for (i = 0; i < n - 1; i++) { t = t + d; d = d + 12; } cout << t; 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() { string...
#include <bits/stdc++.h> using namespace std; int sky(int n) { int count = 1, acount = 12; if (n == 1) return 1; if (n >= 2) { count += acount; for (int i = 2; i < n; i++) { count += (acount * i); } } return count; } int main() { int n; cin >> n; cout << sky(n) << endl; }
### 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 sky(int n) { ...
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; int ans = a * (a - 1) / 2; cout << ans * 12 + 1; }
### 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 ma...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; if (n == 1) { cout << 1 << endl; return 0; } int ans = 13; for (int i = 3; i <= n; i++) { ans += (2 * (i - 1) - 1) * 6 + 6; } cout << ans << endl; }
### 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() { i...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << 6 * n * (n - 1) + 1; }
### 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() { i...
#include <bits/stdc++.h> using namespace std; int main() { unsigned long long a, b = 1; cin >> a; if (a > 1) { for (int i = 1; i < a; i++) { b += (2 * i - 1) * 6 + 6; } } cout << b << endl; }
### 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() { u...
#include <bits/stdc++.h> using LL = long long; using ULL = unsigned long long; using LLL = __int128; using ULLL = unsigned __int128; namespace std { void swap(int& x, int& y) { x ^= (y ^= (x ^= y)); } void swap(LL& x, LL& y) { x ^= (y ^= (x ^= y)); } }; // namespace std using std::swap; template <typename T, typename ...
### 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 LL = long long; using ULL = unsigned ...
#include <bits/stdc++.h> using namespace std; int ret[20000]; int main() { int a; ret[1] = 1; ret[2] = 13; for (int i = 3; i <= 18257; i++) ret[i] = ret[i - 1] + 6 * ((i - 1) * 2); scanf("%d", &a); printf("%d\n", ret[a]); 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 ret[20000]; ...
#include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; long long s = 1; int i; for (i = 1; i <= a; ++i) s += (12 * i - 12); cout << s; 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 ma...
#include <bits/stdc++.h> using namespace std; int main() { long long int m; while (cin >> m) cout << ((m * 3 - 1) * (m * 3 - 2) + 3 * m * (m - 1)) / 2 << 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 ma...
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); 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()...
#include <bits/stdc++.h> using namespace std; template <class T> inline void smn(T &a, const T &b) { if (b < a) a = b; } template <class T> inline void smx(T &a, const T &b) { if (b > a) a = b; } template <class T> inline T rev(const T &a) { T _ = a; reverse(_.begin(), _.end()); return _; } const double eps =...
### 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; templa...
#include <bits/stdc++.h> int main() { int n, y; scanf("%d", &n); y = 6 * n * n - 6 * n + 1; printf("%d", y); }
### 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, y; scanf("%d", &n)...
#include <bits/stdc++.h> using namespace std; long long tri(long long n) { return n * (n + 1) / 2; } int main() { long long n; cin >> n; cout << tri(3 * n - 2) + 3 * tri(n - 1) << 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; long long tri(long long ...
#include <bits/stdc++.h> const long long inf = 1000000000; const long long inf64 = inf * inf; const double pi = acos(-1.0); long long Abs(long long x) { return (x >= 0 ? x : -x); } using namespace std; bool solve() { long long a; cin >> a; vector<long long> dp(a + 2); dp[1] = 1; dp[2] = 13; for (int i(3); i...
### 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> const long long inf = 1000000000; con...
#include <bits/stdc++.h> #pragma GCC optimize(2) using namespace std; inline int read() { char c = getchar(); int x = 0; bool f = 0; for (; !isdigit(c); c = getchar()) f ^= !(c ^ 45); for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48); if (f) x = -x; return x; } int n; int main() { n =...
### 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> #pragma GCC optimize(2) using namespace st...
#include <bits/stdc++.h> int main() { long long int a, i, ans = 1; scanf("%lld", &a); for (i = 2; i <= a; i++) { ans += 12 * (i - 1); } printf("%lld\n", ans); 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() { long long int a, i, an...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << 6 * n * (n - 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() { i...