結果
問題 | No.1603 Manhattan Social Distance |
ユーザー |
![]() |
提出日時 | 2021-07-16 21:26:24 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 136 ms / 2,000 ms |
コード長 | 336 bytes |
コンパイル時間 | 2,176 ms |
コンパイル使用メモリ | 74,684 KB |
実行使用メモリ | 54,472 KB |
最終ジャッジ日時 | 2024-07-06 08:16:53 |
合計ジャッジ時間 | 5,609 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
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); } }