結果
| 問題 |
No.71 そろばん
|
| コンテスト | |
| ユーザー |
Lay_ec
|
| 提出日時 | 2014-11-18 23:36:55 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 416 bytes |
| コンパイル時間 | 896 ms |
| コンパイル使用メモリ | 73,348 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-01-02 18:57:57 |
| 合計ジャッジ時間 | 1,851 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
using namespace std;
int main()
{
long n;
cin>>n;
unsigned long long res=n-1;
for(long i=1;i<=n/2;i++){
res=max(res,(unsigned long long)(i+1)*(n-i+1));
}
cout<<res-1<<endl;
return 0;
}
Lay_ec