結果

問題 No.1603 Manhattan Social Distance
ユーザー 👑 rin204rin204
提出日時 2021-07-16 21:24:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 300 bytes
コンパイル時間 263 ms
コンパイル使用メモリ 87,224 KB
実行使用メモリ 71,648 KB
最終ジャッジ日時 2023-09-20 12:55:38
合計ジャッジ時間 2,575 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,312 KB
testcase_01 AC 76 ms
71,432 KB
testcase_02 AC 73 ms
71,456 KB
testcase_03 AC 74 ms
71,140 KB
testcase_04 AC 74 ms
71,124 KB
testcase_05 WA -
testcase_06 AC 75 ms
71,388 KB
testcase_07 AC 74 ms
71,384 KB
testcase_08 AC 72 ms
71,496 KB
testcase_09 AC 71 ms
71,564 KB
testcase_10 AC 73 ms
71,324 KB
testcase_11 AC 74 ms
71,568 KB
testcase_12 AC 74 ms
71,320 KB
testcase_13 AC 75 ms
71,260 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 74 ms
71,440 KB
testcase_17 AC 75 ms
71,256 KB
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, h, w = map(int, input().split())

lst = []
for i in range(3, -1, -1):
    lst.append((n + i) // 4)

ans = 0
pos = [(1, 1), (h, 1), (1, w), (h, w)]
for i in range(4):
    for j in range(i + 1, 4):
        ans += lst[i] * lst[j] * (abs(pos[i][0] - pos[j][0]) + abs(pos[i][1] - pos[j][1]))
print(ans)
0