結果
問題 |
No.831 都市めぐり
|
ユーザー |
![]() |
提出日時 | 2019-06-27 05:07:14 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 336 bytes |
コンパイル時間 | 1,446 ms |
コンパイル使用メモリ | 164,948 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-26 23:09:03 |
合計ジャッジ時間 | 2,332 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG #include "../include/debug.hpp" #else #define debug(...) 42 #define rdfile(...) 42 #endif int main(){ ios::sync_with_stdio(false); cin.tie(0); long long N; cin >> N; cout << (N == 1 ? 0 : (N*N*N + 3*N*N + 5*N - 6 + (N%2)*3) / 6) << endl; return 0; }