結果
| 問題 |
No.111 あばばばば
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-12 22:30:39 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 320 bytes |
| コンパイル時間 | 848 ms |
| コンパイル使用メモリ | 92,584 KB |
| 最終ジャッジ日時 | 2025-01-17 17:03:24 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <optional>
#include <vector>
using namespace std;
int main() {
int32_t l;
cin >> l;
int64_t t = l / 2, s = t - 1;
cout << t * (t + 1) / 2 + s * (s + 1) / 2 << endl;
return 0;
}