結果

問題 No.48 ロボットの操縦
ユーザー m2543315647m2543315647
提出日時 2015-05-14 14:47:24
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 298 bytes
コンパイル時間 3,476 ms
コンパイル使用メモリ 71,992 KB
実行使用メモリ 56,088 KB
最終ジャッジ日時 2023-09-20 07:42:36
合計ジャッジ時間 8,146 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,932 KB
testcase_01 AC 127 ms
55,808 KB
testcase_02 AC 127 ms
55,512 KB
testcase_03 WA -
testcase_04 AC 128 ms
55,652 KB
testcase_05 AC 130 ms
55,820 KB
testcase_06 AC 131 ms
55,756 KB
testcase_07 AC 131 ms
55,776 KB
testcase_08 WA -
testcase_09 AC 128 ms
55,724 KB
testcase_10 WA -
testcase_11 AC 130 ms
55,768 KB
testcase_12 AC 131 ms
55,868 KB
testcase_13 AC 131 ms
55,712 KB
testcase_14 AC 131 ms
55,992 KB
testcase_15 AC 131 ms
55,728 KB
testcase_16 AC 130 ms
56,076 KB
testcase_17 AC 131 ms
55,688 KB
testcase_18 WA -
testcase_19 AC 129 ms
55,724 KB
testcase_20 AC 129 ms
55,532 KB
testcase_21 AC 124 ms
55,904 KB
testcase_22 WA -
testcase_23 AC 128 ms
55,720 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class No48 {
	public static void main (String[] args){
	Scanner sc =new Scanner(System.in);
	int x=sc.nextInt();
	int y=sc.nextInt();
	int l=sc.nextInt();
	System.out.println((x!=0?Math.abs(x/l)+1:0)+(y==0?0:y>0?y/l:Math.abs(y/l)+2)+(x%l==0?0:1)+(y%l==0?0:1));
	}
}
0