結果

問題 No.1047 Zero (Novice)
ユーザー Yusei KatoYusei Kato
提出日時 2020-06-26 07:42:04
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 62 ms / 2,000 ms
コード長 995 bytes
コンパイル時間 1,647 ms
コンパイル使用メモリ 57,840 KB
実行使用メモリ 15,884 KB
最終ジャッジ日時 2023-09-16 23:27:08
合計ジャッジ時間 4,209 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
15,780 KB
testcase_01 AC 62 ms
15,780 KB
testcase_02 AC 60 ms
15,756 KB
testcase_03 AC 59 ms
15,884 KB
testcase_04 AC 59 ms
15,720 KB
testcase_05 AC 61 ms
15,628 KB
testcase_06 AC 60 ms
15,840 KB
testcase_07 AC 60 ms
15,632 KB
testcase_08 AC 59 ms
15,672 KB
testcase_09 AC 59 ms
15,816 KB
testcase_10 AC 58 ms
15,768 KB
testcase_11 AC 61 ms
15,864 KB
testcase_12 AC 60 ms
15,808 KB
testcase_13 AC 60 ms
15,728 KB
testcase_14 AC 59 ms
15,812 KB
testcase_15 AC 59 ms
15,696 KB
testcase_16 AC 60 ms
15,684 KB
testcase_17 AC 58 ms
15,764 KB
testcase_18 AC 60 ms
15,880 KB
testcase_19 AC 60 ms
15,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Linq;

namespace Problem1047
{
    class Program
    {
        static void Main()
        {
            var value = GetLongArray();
            if(value[1] == 0)
            {
                Console.WriteLine(1);
            }
            else if(value[0] == -1)
            {
                Console.WriteLine(2);
            }
            else
            {
                Console.WriteLine(-1);
            }

        }
        public static int GetInt() => int.Parse(Console.ReadLine());
        public static int[] GetIntArray() => Console.ReadLine().Split().Select(int.Parse).ToArray();
        public static double GetDouble() => double.Parse(Console.ReadLine());
        public static double[] GetDoubleArray() => Console.ReadLine().Split().Select(double.Parse).ToArray();
        public static long GetLong() => long.Parse(Console.ReadLine());
        public static long[] GetLongArray() => Console.ReadLine().Split().Select(long.Parse).ToArray();

    }
}
0