Submission #72210252
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(), x.end()
#ifndef ONLINE_JUDGE
#include "debug.h"
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <class T> void output(vector < T > & a) { for (auto & x: a) {cout << x << ' ';}cout << '\n';}
// Golden Rules
/*
Solutions are simple.
Proofs are simple.
Implementations are simple.
~ TEJA DRONADULA SIR!!
*/
void solve() {
int n;
cin >> n;
cout << (1 << n) - 2 * n << endl;
}
int32_t main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
freopen("error.txt", "w", stderr);
#endif
int t = 1;
// cin >> t;
for (int cases = 1; cases <= t; ++cases) {
solve();
}
#ifndef ONLINE_JUDGE
double T = 1000.0 * clock() / CLOCKS_PER_SEC;
cout << "\n[Finished in " << T << "ms]";
cerr << "\n[Finished in " << T << "ms]";
#endif
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - 2^n - 2*n |
| User | Gokuu007 |
| Language | C++23 (GCC 15.2.0) |
| Score | 100 |
| Code Size | 1305 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3672 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 01.txt, 02.txt, 11.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01.txt | AC | 1 ms | 3644 KiB |
| 02.txt | AC | 1 ms | 3480 KiB |
| 03.txt | AC | 1 ms | 3544 KiB |
| 04.txt | AC | 1 ms | 3512 KiB |
| 05.txt | AC | 1 ms | 3500 KiB |
| 06.txt | AC | 1 ms | 3480 KiB |
| 07.txt | AC | 1 ms | 3600 KiB |
| 08.txt | AC | 1 ms | 3672 KiB |
| 09.txt | AC | 1 ms | 3596 KiB |
| 10.txt | AC | 1 ms | 3616 KiB |
| 11.txt | AC | 1 ms | 3628 KiB |