結果
問題 | No.48 ロボットの操縦 |
ユーザー | Haleakala |
提出日時 | 2018-02-24 16:27:32 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 620 bytes |
コンパイル時間 | 3,512 ms |
コンパイル使用メモリ | 75,356 KB |
実行使用メモリ | 54,452 KB |
最終ジャッジ日時 | 2024-04-22 14:43:48 |
合計ジャッジ時間 | 7,536 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 113 ms
41,392 KB |
testcase_01 | AC | 126 ms
41,564 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 127 ms
41,412 KB |
testcase_05 | WA | - |
testcase_06 | AC | 113 ms
41,208 KB |
testcase_07 | WA | - |
testcase_08 | AC | 128 ms
40,900 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | AC | 131 ms
41,576 KB |
testcase_13 | WA | - |
testcase_14 | AC | 127 ms
41,452 KB |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | AC | 127 ms
41,368 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
ソースコード
import java.util.Scanner; public class Answer { public static void main(String str[]) { Scanner sc = new Scanner(System.in); double x = Double.valueOf(sc.nextLine()); double y = Double.valueOf(sc.nextLine()); double l = Double.valueOf(sc.nextLine()); int operationNum = 0; if(y<0) { operationNum += 2; } if(y == 0){ operationNum += 1; } if(x != 0) { operationNum += 1; } operationNum += Math.abs(Math.ceil(x/l)); operationNum += Math.abs(Math.ceil(y/l)); System.out.println(operationNum); } }