結果
| 問題 |
No.111 あばばばば
|
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2020-11-01 00:08:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 528 bytes |
| コンパイル時間 | 705 ms |
| コンパイル使用メモリ | 92,564 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-22 05:29:07 |
| 合計ジャッジ時間 | 1,267 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>
#include<set>
#define rep(i,n) for(int (i) = 0; i < (n); i++)
using namespace std;
using ll = long long;
using ull = unsigned long long;
const int inf = 1e9 + 7;
int main(){
int l;
cin >> l;
ll a = (l + 1) / 2;
ll ans1 = a * (a - 1) / 2;
ll b = l / 2;
ll ans2 = b * (b - 1) / 2;
ll ans = ans1 + ans2;
cout << ans << endl;
return 0;
}
mmn15277198