結果

問題 No.71 そろばん
ユーザー koyumeishi
提出日時 2014-11-18 23:40:42
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 372 bytes
コンパイル時間 837 ms
コンパイル使用メモリ 75,436 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-01-02 18:58:05
合計ジャッジ時間 1,482 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>

using namespace std;


int main(){
	long long n;
	cin >> n;
	long long ans = 0;
	for(long long i=1; i<=n; i++){
		ans = max(ans, (i+1)*(n-i+1) - 1);
	}
	cout << ans << endl;
	return 0;
}
0