結果

問題 No.71 そろばん
ユーザー KlayKlay
提出日時 2017-05-01 13:41:09
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 5 ms / 5,000 ms
コード長 376 bytes
コンパイル時間 561 ms
コンパイル使用メモリ 51,180 KB
実行使用メモリ 11,232 KB
最終ジャッジ日時 2023-10-12 02:03:02
合計ジャッジ時間 1,991 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 5 ms
11,232 KB
testcase_03 AC 3 ms
6,516 KB
testcase_04 AC 3 ms
7,916 KB
testcase_05 AC 4 ms
10,096 KB
testcase_06 AC 5 ms
10,736 KB
testcase_07 AC 5 ms
8,292 KB
testcase_08 AC 4 ms
6,860 KB
testcase_09 AC 4 ms
10,556 KB
testcase_10 AC 4 ms
8,144 KB
testcase_11 AC 3 ms
4,424 KB
testcase_12 AC 3 ms
5,688 KB
testcase_13 AC 4 ms
10,760 KB
testcase_14 AC 4 ms
6,372 KB
testcase_15 AC 4 ms
9,276 KB
testcase_16 AC 2 ms
4,636 KB
testcase_17 AC 3 ms
6,860 KB
testcase_18 AC 5 ms
9,592 KB
testcase_19 AC 4 ms
10,828 KB
testcase_20 AC 5 ms
10,748 KB
testcase_21 AC 3 ms
6,696 KB
testcase_22 AC 5 ms
8,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main(void)
{
	unsigned long long N;
	
	std::cin >> N;
	
	unsigned long long a[N];
	unsigned long long a_max = 0;
	
	for(unsigned long long i = 0; i <= N; i ++)	//upper = N
	{
		a[i] = (i + 1) * (N - i + 1);
		
		//for debug
		//std::cout << a[i] << std::endl;
		
		if(a[i] > a_max)
		{
			a_max = a[i];
		}
	}
	
	std::cout << a_max - 1;

	return 0;
}
0