結果

問題 No.72 そろばん Med
ユーザー Yang33
提出日時 2016-05-04 16:06:42
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 446 ms
コンパイル使用メモリ 55,896 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-05 06:30:18
合計ジャッジ時間 1,175 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
using namespace std;

int main(void)
{
	long long int n;
	long long int ans = 1;

	cin >> n;
	ans = (n - (n + 1) / 2 + 1)*((n + 1) / 2 + 1) - 1;

	ans %= 1000007;
	/*
	for (long long int i = 1; i < n; i++) {
		ans = max(ans, i + (n - i)*(i + 1));
	}
	*/
	cout << ans << endl;

	return 0;
}
0