結果
| 問題 |
No.831 都市めぐり
|
| コンテスト | |
| ユーザー |
🍮かんプリン
|
| 提出日時 | 2019-05-24 22:01:05 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 227 bytes |
| コンパイル時間 | 437 ms |
| コンパイル使用メモリ | 55,344 KB |
| 実行使用メモリ | 16,832 KB |
| 最終ジャッジ日時 | 2024-09-17 10:41:27 |
| 合計ジャッジ時間 | 6,794 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 -- * 2 |
| other | -- * 18 |
ソースコード
#include <iostream>
using namespace std;
int main() {
int N; cin >> N;
long long int ans = 0;
ans += N + N - 1;
for(int i = N - 1; i >= 1; i++) {
ans += i * (i + 1) - 1;
}
cout << ans << endl;
}
🍮かんプリン