結果
| 問題 |
No.1603 Manhattan Social Distance
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-16 21:35:13 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 700 bytes |
| コンパイル時間 | 76 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-06 08:32:06 |
| 合計ジャッジ時間 | 1,106 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 |
ソースコード
import sys
INF = float('inf')
#10**20,2**63,float('inf')
MOD = 10**9 + 7
MOD2 = 998244353
#from collections import defaultdict
def solve():
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LC(): return list(input())
def IC(): return [int(c) for c in input()]
def MI(): return map(int, sys.stdin.readline().split())
#2隅でもよい?四隅に均等に置いた方がいい?
N,H,W = MI()
h = H-1
w = W-1
Ans = (N//2)*(N//2)*(h+w)
if(N%2 == 1):
Ans += (N//2)*(h+w)
print(Ans)
return
solve()
#sys.setrecursionlimit(10 ** 6)#再帰関数ではコメントにしないこと!!