Submission #72266340
Source Code Expand
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <bitset>
#include <numeric>
using namespace std;
#define ll long long
#define vi vector<int>
#define vs vector<string>
#define vll vector<long long>
#define vii vector<pair<int, int>>
#define vllvector vector<pair<ll, ll>>
#define vb vector<bool>
#define yes cout << "Yes" << endl;
#define no cout << "No" << endl;
#define rep(i, c, n) for (int i = c; i < n; i++)
const long long llINF = 1LL << 60;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true;} return false;}
//! int型でinfを使うならINT_MAX使う
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll n;
cin >> n;
ll ans = 0;
ans = pow(2, n) - 2*n;
cout << ans << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - 2^n - 2*n |
| User | kar1neko |
| Language | C++23 (GCC 15.2.0) |
| Score | 100 |
| Code Size | 989 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3876 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 | 3776 KiB |
| 02.txt | AC | 1 ms | 3732 KiB |
| 03.txt | AC | 1 ms | 3724 KiB |
| 04.txt | AC | 1 ms | 3776 KiB |
| 05.txt | AC | 1 ms | 3724 KiB |
| 06.txt | AC | 1 ms | 3852 KiB |
| 07.txt | AC | 1 ms | 3852 KiB |
| 08.txt | AC | 1 ms | 3688 KiB |
| 09.txt | AC | 1 ms | 3724 KiB |
| 10.txt | AC | 1 ms | 3832 KiB |
| 11.txt | AC | 1 ms | 3876 KiB |