結果
| 問題 | No.1603 Manhattan Social Distance |
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2021-07-16 21:26:24 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 55 ms / 2,000 ms |
| + 82µs | |
| コード長 | 336 bytes |
| 記録 | |
| コンパイル時間 | 1,330 ms |
| コンパイル使用メモリ | 84,348 KB |
| 実行使用メモリ | 43,008 KB |
| 最終ジャッジ日時 | 2026-08-09 07:51:17 |
| 合計ジャッジ時間 | 3,775 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);
}
}
ks2m