結果

問題 No.80 四角形を描こう
ユーザー kano_townkano_town
提出日時 2014-11-27 23:31:15
言語 Java19
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 279 bytes
コンパイル時間 3,087 ms
コンパイル使用メモリ 72,592 KB
実行使用メモリ 56,428 KB
最終ジャッジ日時 2023-07-29 16:51:57
合計ジャッジ時間 5,472 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,944 KB
testcase_01 AC 122 ms
55,392 KB
testcase_02 AC 123 ms
55,536 KB
testcase_03 AC 121 ms
56,428 KB
testcase_04 AC 122 ms
55,916 KB
testcase_05 AC 121 ms
55,892 KB
testcase_06 AC 119 ms
55,352 KB
testcase_07 AC 120 ms
55,548 KB
testcase_08 AC 121 ms
55,916 KB
testcase_09 AC 122 ms
55,620 KB
testcase_10 AC 121 ms
55,596 KB
testcase_11 AC 123 ms
55,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Yukicoder80 {
	public static void main(String[] args) {
		int D = new Scanner(System.in).nextInt(), max = 0;
		for (int i = 1; i < D/2; i ++) 	max = Math.max(max, i * (int)Math.floor((D - i * 2)/2));
		System.out.println(max);
	}
}
0