結果

問題 No.80 四角形を描こう
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-25 08:08:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 5,000 ms
コード長 308 bytes
コンパイル時間 3,642 ms
コンパイル使用メモリ 77,464 KB
実行使用メモリ 54,264 KB
最終ジャッジ日時 2024-04-20 02:38:23
合計ジャッジ時間 6,161 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
53,996 KB
testcase_01 AC 123 ms
53,984 KB
testcase_02 AC 119 ms
52,684 KB
testcase_03 AC 141 ms
54,144 KB
testcase_04 AC 136 ms
54,188 KB
testcase_05 AC 134 ms
54,264 KB
testcase_06 AC 130 ms
54,264 KB
testcase_07 AC 134 ms
53,868 KB
testcase_08 AC 126 ms
54,164 KB
testcase_09 AC 133 ms
54,132 KB
testcase_10 AC 129 ms
54,260 KB
testcase_11 AC 134 ms
54,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise123{
  public static void main (String[] args){

    Scanner sc = new Scanner(System.in);

    int d = sc.nextInt() / 2;
    int max = 0;
    for(int i = 0; i < d; i++){
      int s = i * (d - i);
      max = Math.max(max, s);
    }
    System.out.println(max);
	}
}
0