結果

問題 No.80 四角形を描こう
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-25 08:08:50
言語 Java19
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 308 bytes
コンパイル時間 3,275 ms
コンパイル使用メモリ 72,940 KB
実行使用メモリ 56,508 KB
最終ジャッジ日時 2023-08-02 02:13:18
合計ジャッジ時間 6,302 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
56,132 KB
testcase_01 AC 115 ms
56,360 KB
testcase_02 AC 114 ms
56,072 KB
testcase_03 AC 117 ms
56,508 KB
testcase_04 AC 119 ms
56,360 KB
testcase_05 AC 116 ms
55,908 KB
testcase_06 AC 120 ms
55,544 KB
testcase_07 AC 121 ms
55,972 KB
testcase_08 AC 123 ms
55,784 KB
testcase_09 AC 122 ms
55,988 KB
testcase_10 AC 122 ms
55,536 KB
testcase_11 AC 122 ms
56,128 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