結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-26 22:53:49 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 492 bytes |
| 記録 | |
| コンパイル時間 | 2,815 ms |
| コンパイル使用メモリ | 87,276 KB |
| 実行使用メモリ | 41,944 KB |
| 最終ジャッジ日時 | 2026-05-16 00:04:14 |
| 合計ジャッジ時間 | 4,911 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);
}
}