結果
| 問題 |
No.80 四角形を描こう
|
| コンテスト | |
| ユーザー |
くれちー
|
| 提出日時 | 2017-01-09 23:02:13 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 5,000 ms |
| コード長 | 240 bytes |
| コンパイル時間 | 185 ms |
| コンパイル使用メモリ | 20,096 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-18 00:20:35 |
| 合計ジャッジ時間 | 703 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 8 |
コンパイルメッセージ
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);
| ^~~~~~~~~~~~~~~
ソースコード
#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, 2500) rep(j, 2500)
if (i * 2 + j * 2 <= d && i * j > max) max = i * j;
printf("%d\n", max);
return 0;
}
くれちー