結果

問題 No.80 四角形を描こう
ユーザー hhgfhn1hhgfhn1
提出日時 2018-10-29 16:04:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 293 bytes
コンパイル時間 2,053 ms
コンパイル使用メモリ 74,508 KB
実行使用メモリ 41,476 KB
最終ジャッジ日時 2024-04-29 22:45:34
合計ジャッジ時間 4,372 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
40,152 KB
testcase_01 AC 125 ms
41,316 KB
testcase_02 AC 117 ms
39,856 KB
testcase_03 AC 127 ms
41,476 KB
testcase_04 AC 128 ms
41,236 KB
testcase_05 AC 129 ms
41,280 KB
testcase_06 AC 126 ms
41,168 KB
testcase_07 AC 126 ms
41,028 KB
testcase_08 AC 128 ms
41,008 KB
testcase_09 AC 112 ms
39,836 KB
testcase_10 AC 114 ms
40,180 KB
testcase_11 AC 130 ms
40,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int half=n/2;
		int a=half/2;
		int b=(int) Math.ceil(half/2.0);
		System.out.println(a*b);
	}
}
0