結果

問題 No.48 ロボットの操縦
ユーザー kohaku_kohaku
提出日時 2016-11-09 21:35:08
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 669 bytes
コンパイル時間 1,951 ms
コンパイル使用メモリ 73,672 KB
実行使用メモリ 54,900 KB
最終ジャッジ日時 2024-11-25 06:02:57
合計ジャッジ時間 5,506 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int X = sc.nextInt(); X=0;
        int Y = sc.nextInt(); Y=2;
        int L = sc.nextInt(); L=1;
        int turn=0;
        int gox=0;
        int goy=0;

        if(X%L==0){
                gox=X/L;
        }else{
                gox=X/L+1;
        }
        if(Y%L==0){
                goy=Y/L;
        }else{
                goy=Y/L+1;
        }

        if(X!=0){
                turn=1;
        }
        if(Y<0){
                turn=turn+1;
        }

        int r = gox+goy+turn;
        System.out.println( r );
    }
}
0