結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
![]() |
提出日時 | 2018-02-24 16:25:22 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 631 bytes |
コンパイル時間 | 3,462 ms |
コンパイル使用メモリ | 75,520 KB |
実行使用メモリ | 41,404 KB |
最終ジャッジ日時 | 2024-10-14 13:44:28 |
合計ジャッジ時間 | 7,876 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 WA * 17 |
ソースコード
import java.util.Scanner; public class Answer { public static void main(String str[]) { Scanner sc = new Scanner(System.in); int x = Integer.valueOf(sc.nextLine()); int y = Integer.valueOf(sc.nextLine()); int l = Integer.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((double)x/l)); operationNum += Math.abs(Math.ceil((double)y/l)); System.out.println(operationNum); } }