結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-12 23:10:26 |
| 言語 | JavaScript (node v23.5.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 374 bytes |
| コンパイル時間 | 29 ms |
| コンパイル使用メモリ | 6,688 KB |
| 実行使用メモリ | 41,452 KB |
| 最終ジャッジ日時 | 2024-10-13 01:20:47 |
| 合計ジャッジ時間 | 2,212 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 25 |
ソースコード
function Main(input) {
const data = input.trim().split(" ")
const X = parseInt(data[0]), Y = parseInt(data[1]), L = parseInt(data[2])
let count = 0
count += X ? 1 : 0
if (Y < 0) {
count += count ? 1 : 2
}
count += Math.ceil(Math.abs(X) / L)
count += Math.ceil(Math.abs(Y) / L)
console.log(count)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))