結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-25 13:59:09 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 358 bytes |
| 記録 | |
| コンパイル時間 | 2,182 ms |
| コンパイル使用メモリ | 81,548 KB |
| 実行使用メモリ | 43,444 KB |
| 最終ジャッジ日時 | 2026-04-30 08:27:03 |
| 合計ジャッジ時間 | 4,330 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 21 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x, y, l;
x = sc.nextInt();
y = sc.nextInt();
l = sc.nextInt();
sc.close();
int ans;
if(x == 0) ans = 0;
else ans = 1;
if (x < 0){
ans++;
x *= -1;
}
System.out.println(x/l + y/l + ans);
}
}