結果

問題 No.80 四角形を描こう
ユーザー fjafjafjafjafjafja
提出日時 2017-10-06 15:28:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 5,000 ms
コード長 219 bytes
コンパイル時間 4,605 ms
コンパイル使用メモリ 74,580 KB
実行使用メモリ 41,412 KB
最終ジャッジ日時 2024-04-28 10:21:58
合計ジャッジ時間 6,030 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
40,848 KB
testcase_01 AC 135 ms
41,236 KB
testcase_02 AC 138 ms
41,216 KB
testcase_03 AC 137 ms
41,356 KB
testcase_04 AC 134 ms
41,248 KB
testcase_05 AC 134 ms
41,232 KB
testcase_06 AC 142 ms
41,052 KB
testcase_07 AC 134 ms
41,412 KB
testcase_08 AC 137 ms
41,116 KB
testcase_09 AC 136 ms
41,376 KB
testcase_10 AC 131 ms
41,272 KB
testcase_11 AC 135 ms
41,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class N80 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int d=sc.nextInt();
		d=(d%2==1)?((d-1)/2):d/2;
		System.out.println((d/2)*(d-d/2));
	}
}
0