結果

問題 No.48 ロボットの操縦
ユーザー zmirezzmirez
提出日時 2018-05-25 13:34:28
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 542 bytes
コンパイル時間 1,948 ms
コンパイル使用メモリ 101,796 KB
実行使用メモリ 27,032 KB
最終ジャッジ日時 2023-09-11 03:24:52
合計ジャッジ時間 4,603 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
24,748 KB
testcase_01 AC 61 ms
22,780 KB
testcase_02 AC 61 ms
22,792 KB
testcase_03 WA -
testcase_04 AC 60 ms
22,608 KB
testcase_05 AC 59 ms
20,756 KB
testcase_06 AC 61 ms
24,684 KB
testcase_07 AC 61 ms
22,660 KB
testcase_08 AC 62 ms
22,648 KB
testcase_09 AC 61 ms
22,796 KB
testcase_10 WA -
testcase_11 AC 61 ms
24,684 KB
testcase_12 AC 62 ms
22,680 KB
testcase_13 AC 61 ms
20,596 KB
testcase_14 AC 61 ms
22,792 KB
testcase_15 AC 61 ms
22,620 KB
testcase_16 AC 62 ms
22,844 KB
testcase_17 AC 62 ms
24,800 KB
testcase_18 WA -
testcase_19 AC 61 ms
22,720 KB
testcase_20 AC 61 ms
22,800 KB
testcase_21 AC 60 ms
20,748 KB
testcase_22 AC 61 ms
22,728 KB
testcase_23 AC 61 ms
22,644 KB
testcase_24 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
class Program{
    static void Main(string[]args){
        double x=int.Parse(Console.ReadLine());
        double y=int.Parse(Console.ReadLine());
        double l=int.Parse(Console.ReadLine());
        if(y>=0&&x==0){
            Console.WriteLine(Math.Ceiling(y/l));
        }else if(y>=0&&Math.Abs(x)>0){
            Console.WriteLine(Math.Ceiling(y/l)+1+Math.Ceiling(Math.Abs(x)/l));
        }else if(y<0){
            Console.WriteLine(Math.Ceiling(Math.Abs(y)/l)+2+Math.Ceiling(x/l));
        }
    }
    
}
0