結果

問題 No.48 ロボットの操縦
ユーザー yuuki121yuuki121
提出日時 2021-01-05 23:37:57
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 532 bytes
コンパイル時間 2,067 ms
コンパイル使用メモリ 73,772 KB
実行使用メモリ 37,300 KB
最終ジャッジ日時 2024-04-24 01:58:38
合計ジャッジ時間 4,293 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
36,948 KB
testcase_01 AC 51 ms
37,048 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 51 ms
36,936 KB
testcase_05 AC 53 ms
36,524 KB
testcase_06 WA -
testcase_07 AC 53 ms
37,032 KB
testcase_08 WA -
testcase_09 AC 52 ms
36,516 KB
testcase_10 WA -
testcase_11 AC 52 ms
37,004 KB
testcase_12 AC 52 ms
37,072 KB
testcase_13 AC 53 ms
36,984 KB
testcase_14 AC 53 ms
37,144 KB
testcase_15 AC 52 ms
36,548 KB
testcase_16 AC 53 ms
37,044 KB
testcase_17 AC 51 ms
36,908 KB
testcase_18 WA -
testcase_19 AC 54 ms
37,020 KB
testcase_20 AC 52 ms
37,096 KB
testcase_21 AC 52 ms
36,748 KB
testcase_22 WA -
testcase_23 AC 53 ms
36,736 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int x = Math.abs(Integer.parseInt(br.readLine()));
		int y = Math.abs(Integer.parseInt(br.readLine()));
		int l = Integer.parseInt(br.readLine());

		int xl = (x + l - 1) / l;
		int yl = (y + l - 1) / l;
		System.out.println((xl > 0 && yl > 0) ? xl + yl + 1 : xl + yl);

	}

}
0