結果
| 問題 | No.1603 Manhattan Social Distance |
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 20:56:25 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 240 bytes |
| 記録 | |
| コンパイル時間 | 222 ms |
| コンパイル使用メモリ | 96,152 KB |
| 実行使用メモリ | 79,188 KB |
| 最終ジャッジ日時 | 2026-07-07 12:23:21 |
| 合計ジャッジ時間 | 3,053 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_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