結果

問題 No.1603 Manhattan Social Distance
ユーザー ks2mks2m
提出日時 2021-07-16 21:26:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 336 bytes
コンパイル時間 1,954 ms
コンパイル使用メモリ 71,392 KB
実行使用メモリ 58,112 KB
最終ジャッジ日時 2023-09-20 12:59:00
合計ジャッジ時間 5,424 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,756 KB
testcase_01 AC 123 ms
55,756 KB
testcase_02 AC 123 ms
58,112 KB
testcase_03 AC 124 ms
55,856 KB
testcase_04 AC 122 ms
55,624 KB
testcase_05 AC 123 ms
56,220 KB
testcase_06 AC 121 ms
53,624 KB
testcase_07 AC 123 ms
55,744 KB
testcase_08 AC 121 ms
54,328 KB
testcase_09 AC 121 ms
55,768 KB
testcase_10 AC 123 ms
55,804 KB
testcase_11 AC 122 ms
55,896 KB
testcase_12 AC 127 ms
54,268 KB
testcase_13 AC 122 ms
56,144 KB
testcase_14 AC 121 ms
56,292 KB
testcase_15 AC 123 ms
55,728 KB
testcase_16 AC 123 ms
55,928 KB
testcase_17 AC 125 ms
56,112 KB
testcase_18 AC 125 ms
56,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int h = sc.nextInt();
		int w = sc.nextInt();
		sc.close();

		long ans = h + w - 2;
		int n2 = n / 2;
		ans *= n2;
		ans *= n - n2;
		System.out.println(ans);
	}
}
0