結果
| 問題 | No.831 都市めぐり | 
| コンテスト | |
| ユーザー |  risujiroh | 
| 提出日時 | 2019-05-24 21:29:04 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 397 bytes | 
| コンパイル時間 | 1,564 ms | 
| コンパイル使用メモリ | 164,988 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-17 10:27:11 | 
| 合計ジャッジ時間 | 2,022 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | AC * 18 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
using lint = long long;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);
  lint n; cin >> n;
  if (n & 1) {
    cout << (n * n * n + 3 * n * n + 5 * n - 3) / 6 << '\n';
  } else {
    cout << (n * n * n + 3 * n * n + 5 * n - 6) / 6 << '\n';
  }
}
            
            
            
        