結果

問題 No.48 ロボットの操縦
ユーザー mencottonmencotton
提出日時 2017-12-25 16:14:50
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 582 bytes
コンパイル時間 1,044 ms
コンパイル使用メモリ 102,528 KB
実行使用メモリ 17,792 KB
最終ジャッジ日時 2024-05-10 00:56:18
合計ジャッジ時間 2,504 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
17,792 KB
testcase_01 AC 19 ms
17,536 KB
testcase_02 WA -
testcase_03 AC 18 ms
17,536 KB
testcase_04 AC 19 ms
17,792 KB
testcase_05 AC 19 ms
17,536 KB
testcase_06 WA -
testcase_07 AC 19 ms
17,664 KB
testcase_08 AC 18 ms
17,536 KB
testcase_09 AC 18 ms
17,664 KB
testcase_10 AC 18 ms
17,792 KB
testcase_11 AC 19 ms
17,792 KB
testcase_12 AC 20 ms
17,536 KB
testcase_13 AC 19 ms
17,536 KB
testcase_14 AC 18 ms
17,408 KB
testcase_15 AC 19 ms
17,792 KB
testcase_16 AC 19 ms
17,536 KB
testcase_17 AC 19 ms
17,536 KB
testcase_18 AC 19 ms
17,792 KB
testcase_19 AC 19 ms
17,664 KB
testcase_20 AC 20 ms
17,664 KB
testcase_21 AC 19 ms
17,536 KB
testcase_22 AC 19 ms
17,664 KB
testcase_23 AC 20 ms
17,664 KB
testcase_24 AC 20 ms
17,408 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace template
{
    class Program
    {
        static void Main(string[] args)
        {
            int x = int.Parse(Console.ReadLine());
            int y = int.Parse(Console.ReadLine());
            int n = int.Parse(Console.ReadLine());
            int ret = (Math.Abs(x) - 1) / n + 1;
            ret += (Math.Abs(y) - 1) / n + 1;
            if (y < 0) ret += 2;
            else if (x != 0) ret++;
            Console.WriteLine(ret);
        }
    }
}
0