結果

問題 No.48 ロボットの操縦
ユーザー カニ戯(ryカニ戯(ry
提出日時 2015-02-26 12:05:48
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 298 bytes
コンパイル時間 1,929 ms
コンパイル使用メモリ 71,244 KB
実行使用メモリ 56,764 KB
最終ジャッジ日時 2023-09-06 05:02:43
合計ジャッジ時間 6,243 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
56,152 KB
testcase_01 AC 117 ms
55,632 KB
testcase_02 AC 121 ms
55,868 KB
testcase_03 AC 120 ms
55,640 KB
testcase_04 WA -
testcase_05 AC 119 ms
55,844 KB
testcase_06 AC 118 ms
56,040 KB
testcase_07 WA -
testcase_08 AC 120 ms
55,844 KB
testcase_09 AC 121 ms
55,916 KB
testcase_10 AC 122 ms
55,696 KB
testcase_11 AC 121 ms
55,728 KB
testcase_12 AC 120 ms
56,064 KB
testcase_13 AC 121 ms
55,732 KB
testcase_14 AC 120 ms
55,812 KB
testcase_15 AC 119 ms
55,848 KB
testcase_16 AC 121 ms
53,428 KB
testcase_17 AC 122 ms
55,892 KB
testcase_18 AC 121 ms
55,688 KB
testcase_19 AC 122 ms
56,080 KB
testcase_20 AC 123 ms
55,456 KB
testcase_21 AC 119 ms
54,424 KB
testcase_22 AC 119 ms
55,836 KB
testcase_23 AC 121 ms
56,040 KB
testcase_24 AC 126 ms
56,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main {
	public static void main(String[] a) {
		Scanner s=new Scanner(System.in);
		int X=s.nextInt(),Y=s.nextInt(),L=s.nextInt(),H=(int)Math.ceil(Math.abs((float)X/L)),V=(int)Math.ceil(Math.abs((float)Y/L));
		System.out.println(H+V+(Y<0?2:X==0?0:1));
	}
}
0