結果
| 問題 | No.1603 Manhattan Social Distance |
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 18:44:56 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 63 ms / 2,000 ms |
| コード長 | 240 bytes |
| 記録 | |
| コンパイル時間 | 238 ms |
| コンパイル使用メモリ | 95,856 KB |
| 実行使用メモリ | 79,232 KB |
| 最終ジャッジ日時 | 2026-07-07 07:31:26 |
| 合計ジャッジ時間 | 2,845 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 |
ソースコード
N, H, W = map(int, input().split())
def calculate_contribution(L, n):
if L == 1:
return 0
k = n // 2
m = n - k
return k * m * (L - 1)
total = calculate_contribution(H, N) + calculate_contribution(W, N)
print(total)
lam6er