結果
問題 | No.1491 銀将 |
ユーザー | umezo |
提出日時 | 2021-04-30 21:41:54 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 47 ms / 1,000 ms |
コード長 | 265 bytes |
コンパイル時間 | 2,028 ms |
コンパイル使用メモリ | 193,344 KB |
最終ジャッジ日時 | 2025-01-21 02:44:34 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include <bits/stdc++.h> using namespace std; int main(){ ll k; cin>>k; if(k%2==0) cout<<4*k*k+2<<endl; else cout<<4*k*k+2*k-k/2*4<<endl; return 0; }