結果

問題 No.80 四角形を描こう
ユーザー くれちー
提出日時 2017-01-09 22:57:58
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 861 ms
コンパイル使用メモリ 19,840 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-18 00:20:34
合計ジャッジ時間 976 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 4 WA * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%d", &d);
      |         ^~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>
#define rep(i, n) for (i = 0; i < n; i++)

int main() {
	int d;
	scanf("%d", &d);

	int i, j, max = 0;
	rep(i, 100)	rep(j, 100) 
		if (i * 2 + j * 2 <= d && i * j > max) max = i * j;
	
	printf("%d\n", max);
	return 0;
}
0