結果
| 問題 | 
                            No.48 ロボットの操縦
                             | 
                    
| コンテスト | |
| ユーザー | 
                             カニ戯(ry
                         | 
                    
| 提出日時 | 2015-02-26 11:59:50 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 378 bytes | 
| コンパイル時間 | 1,949 ms | 
| コンパイル使用メモリ | 74,356 KB | 
| 実行使用メモリ | 54,476 KB | 
| 最終ジャッジ日時 | 2024-06-23 23:46:48 | 
| 合計ジャッジ時間 | 6,014 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 24 WA * 1 | 
ソースコード
import java.util.Scanner;
public class Main {
	public static void main(String[] a) {
		Scanner s=new Scanner(System.in);
		int X=s.nextInt(),Y=s.nextInt(),L=s.nextInt();
		int H=(int)Math.ceil(Math.abs((double)X/L)),V=(int)Math.ceil(Math.abs((double)Y/L));
		int P=(int)(Math.signum(X)+1+3*(Math.signum(Y)+1));
		System.out.println(H+V+(new int[]{2,2,2,1,0,1,1,1,1})[P]);
	}
}
            
            
            
        
            
カニ戯(ry