結果

問題 No.1603 Manhattan Social Distance
ユーザー SidewaysOwlSidewaysOwl
提出日時 2021-07-16 22:17:05
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 812 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 71,604 KB
最終ジャッジ日時 2023-09-20 14:26:40
合計ジャッジ時間 2,735 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,472 KB
testcase_01 AC 78 ms
71,184 KB
testcase_02 AC 77 ms
71,264 KB
testcase_03 AC 78 ms
71,408 KB
testcase_04 AC 77 ms
71,604 KB
testcase_05 AC 79 ms
71,124 KB
testcase_06 AC 79 ms
71,264 KB
testcase_07 AC 78 ms
71,184 KB
testcase_08 AC 76 ms
71,188 KB
testcase_09 AC 76 ms
71,376 KB
testcase_10 AC 76 ms
71,264 KB
testcase_11 AC 76 ms
71,520 KB
testcase_12 AC 77 ms
71,320 KB
testcase_13 AC 77 ms
71,440 KB
testcase_14 AC 77 ms
71,512 KB
testcase_15 AC 75 ms
71,348 KB
testcase_16 AC 77 ms
71,404 KB
testcase_17 AC 77 ms
71,468 KB
testcase_18 AC 78 ms
71,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,h,w = map(int,input().split())
n -= 1
intn = n // 2
amarin = n % 2
ans = intn * (2 * (h+w-2) + intn * 2 * (h+w-2)) // 2 + amarin * (intn + 1)  * (h + w-2) 
print(ans)
0