結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-07 17:14:39 |
| 言語 | TypeScript (5.7.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 422 bytes |
| コンパイル時間 | 7,630 ms |
| コンパイル使用メモリ | 230,164 KB |
| 実行使用メモリ | 41,208 KB |
| 最終ジャッジ日時 | 2024-12-31 17:00:44 |
| 合計ジャッジ時間 | 9,937 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 WA * 1 |
ソースコード
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(Math.abs(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"));