結果

問題 No.48 ロボットの操縦
ユーザー kazutaka-machidakazutaka-machida
提出日時 2023-07-07 17:13:05
言語 TypeScript
(5.4.3)
結果
WA  
実行時間 -
コード長 412 bytes
コンパイル時間 7,109 ms
コンパイル使用メモリ 255,352 KB
実行使用メモリ 43,880 KB
最終ジャッジ日時 2023-09-28 17:58:26
合計ジャッジ時間 10,378 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
41,852 KB
testcase_01 AC 82 ms
41,840 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 77 ms
41,660 KB
testcase_05 AC 78 ms
41,796 KB
testcase_06 AC 78 ms
41,780 KB
testcase_07 AC 78 ms
41,900 KB
testcase_08 WA -
testcase_09 AC 79 ms
41,832 KB
testcase_10 WA -
testcase_11 AC 79 ms
41,896 KB
testcase_12 AC 78 ms
41,708 KB
testcase_13 AC 78 ms
41,904 KB
testcase_14 AC 78 ms
41,844 KB
testcase_15 AC 78 ms
41,932 KB
testcase_16 AC 78 ms
41,860 KB
testcase_17 AC 79 ms
41,872 KB
testcase_18 WA -
testcase_19 AC 79 ms
41,640 KB
testcase_20 AC 80 ms
41,832 KB
testcase_21 AC 79 ms
41,900 KB
testcase_22 WA -
testcase_23 AC 80 ms
41,776 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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"));
0