結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
![]() |
提出日時 | 2016-02-10 17:41:46 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 3,435 ms |
コンパイル使用メモリ | 74,848 KB |
実行使用メモリ | 41,488 KB |
最終ジャッジ日時 | 2024-09-21 22:06:07 |
合計ジャッジ時間 | 7,174 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 1 |
ソースコード
import java.util.Scanner; public class No48 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int Y = sc.nextInt(); int L = sc.nextInt(); int ans = 0; ans += (Math.abs(Y) + L - 1) / L; ans += (Math.abs(X) + L - 1) / L; if(Y < 0){ ans++; } if(X != 0){ ans++; } System.out.println(ans); } }