結果
| 問題 |
No.1603 Manhattan Social Distance
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-13 11:45:12 |
| 言語 | TypeScript (5.7.2) |
| 結果 |
AC
|
| 実行時間 | 67 ms / 2,000 ms |
| コード長 | 427 bytes |
| コンパイル時間 | 8,882 ms |
| コンパイル使用メモリ | 228,376 KB |
| 実行使用メモリ | 41,328 KB |
| 最終ジャッジ日時 | 2024-12-31 16:44:40 |
| 合計ジャッジ時間 | 10,094 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 |
ソースコード
import * as fs from "fs"
type Input = (args: string) => void
function add(a: bigint, b: number): bigint {
return a + BigInt(b)
}
const main: Input = args => {
const input = args.trim().split("\n");
const [n, h, w] = input.shift().split(" ").map(x => BigInt(x))
let ans = (add(h + w, -2)) * (add(n, 1) / BigInt(2) * (n / BigInt(2)))
console.log(String(ans))
}
main(fs.readFileSync('/dev/stdin', 'utf8'));