結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
24,616 KB
testcase_01 AC 61 ms
24,720 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 62 ms
24,612 KB
testcase_05 AC 58 ms
20,716 KB
testcase_06 AC 62 ms
22,572 KB
testcase_07 AC 63 ms
22,744 KB
testcase_08 WA -
testcase_09 AC 62 ms
24,992 KB
testcase_10 WA -
testcase_11 AC 61 ms
20,664 KB
testcase_12 AC 61 ms
22,924 KB
testcase_13 AC 61 ms
22,508 KB
testcase_14 AC 61 ms
24,756 KB
testcase_15 AC 60 ms
22,624 KB
testcase_16 AC 61 ms
22,564 KB
testcase_17 AC 61 ms
22,564 KB
testcase_18 WA -
testcase_19 AC 62 ms
22,664 KB
testcase_20 AC 63 ms
24,696 KB
testcase_21 AC 62 ms
24,608 KB
testcase_22 WA -
testcase_23 AC 61 ms
22,592 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(y/l)+2+Math.Ceiling(x/l));
        }
    }
    
}
0