結果

問題 No.1603 Manhattan Social Distance
ユーザー merlinmerlin
提出日時 2021-07-16 21:36:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 457 bytes
コンパイル時間 2,622 ms
コンパイル使用メモリ 71,800 KB
実行使用メモリ 49,468 KB
最終ジャッジ日時 2023-09-20 13:16:39
合計ジャッジ時間 3,829 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,172 KB
testcase_01 AC 43 ms
49,468 KB
testcase_02 AC 43 ms
49,080 KB
testcase_03 AC 43 ms
49,180 KB
testcase_04 AC 44 ms
49,188 KB
testcase_05 AC 43 ms
49,188 KB
testcase_06 AC 44 ms
49,236 KB
testcase_07 AC 44 ms
49,084 KB
testcase_08 AC 44 ms
49,200 KB
testcase_09 AC 43 ms
49,296 KB
testcase_10 AC 44 ms
49,196 KB
testcase_11 AC 43 ms
49,080 KB
testcase_12 AC 43 ms
49,112 KB
testcase_13 AC 43 ms
48,944 KB
testcase_14 AC 43 ms
49,408 KB
testcase_15 AC 43 ms
48,900 KB
testcase_16 AC 43 ms
49,248 KB
testcase_17 AC 43 ms
49,080 KB
testcase_18 AC 43 ms
49,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        String s[]=bu.readLine().split(" ");
        int n=Integer.parseInt(s[0]),h=Integer.parseInt(s[1]),w=Integer.parseInt(s[2]);
        long ans=1l*(n/2)*(n-n/2)*(h+w-2);
        System.out.print(ans);
    }
}
0