結果

問題 No.80 四角形を描こう
ユーザー hamray
提出日時 2019-03-21 16:30:20
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 233 bytes
コンパイル時間 687 ms
コンパイル使用メモリ 56,412 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-19 01:44:54
合計ジャッジ時間 1,201 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
	int n; cin >> n;

	n /= 2;

	
	int ans = 0;
	for (int i = 1; i <= n; ++i) {
		int a = i;
		int b = n - i;
		ans = max(ans, a*b);
	}
	cout << ans << endl;

}
0