結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-26 22:53:49 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 492 bytes |
| 記録 | |
| コンパイル時間 | 4,167 ms |
| コンパイル使用メモリ | 74,996 KB |
| 実行使用メモリ | 54,796 KB |
| 最終ジャッジ日時 | 2024-11-21 20:13:40 |
| 合計ジャッジ時間 | 7,268 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 18 |
ソースコード
import java.text.DecimalFormat;
import java.util.Scanner;
public class No48 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int x = Math.abs(s.nextInt());
int y = Math.abs(s.nextInt());
int l = s.nextInt();
int turn = x != 0 && y != 0 ? 1 : 0;
String steps = new DecimalFormat("")
.format(Math.ceil((double) x / l) + Math.ceil((double) y / l) + turn);
System.out.println(steps);
}
}