結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-07 17:13:05 |
| 言語 | TypeScript (5.7.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 412 bytes |
| コンパイル時間 | 8,291 ms |
| コンパイル使用メモリ | 230,148 KB |
| 実行使用メモリ | 39,552 KB |
| 最終ジャッジ日時 | 2024-12-31 17:00:43 |
| 合計ジャッジ時間 | 10,815 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 7 |
ソースコード
function Main(input: string) {
const inputs = input.split("\n");
const X = Math.abs(Number(inputs[0]))
const Y = Number(inputs[1])
const L = Number(inputs[2])
let count = 0
if (Y != 0) {
count += Math.ceil(Y/L)
if (Y < 0) {
count += 1
}
}
if (X != 0) {
count += 1
count += Math.ceil(X/L)
}
console.log(count)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));