結果
| 問題 |
No.1491 銀将
|
| コンテスト | |
| ユーザー |
Re_code_A
|
| 提出日時 | 2021-05-01 14:26:47 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 939 bytes |
| コンパイル時間 | 2,308 ms |
| コンパイル使用メモリ | 165,048 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-19 22:00:11 |
| 合計ジャッジ時間 | 2,415 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 |
ソースコード
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;
using ll = long long;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ld long double
#define al(a) (a).begin(),(a).end()
#define mk make_pair
#define check cout<<"?"<<endl;
ll MOD=1000000007;
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;
template<typename T>
ostream& operator<<(ostream& os,const vector<T>& v){
if(v.empty()){
os<<"{ }";
return os;
}
os<<"{"<<v.front();
for(auto itr=++v.begin();itr!=v.end();itr++){
os<<", "<<*itr;
}
os<<"}";
return os;
}
template<typename T_first,typename T_second>
ostream& operator<<(ostream& os,const pair<T_first,T_second>& P){
os<<"("<<P.first;
os<<", "<<P.second;
os<<")";
return os;
}
int main(){
ll k; cin>>k;
cout<<(k+1)*(k+1)+k*k*2+(k-1)*(k-1)<<endl;
}
Re_code_A