結果
問題 |
No.1047 Zero (Novice)
|
ユーザー |
![]() |
提出日時 | 2020-06-26 07:42:04 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 995 bytes |
コンパイル時間 | 2,284 ms |
コンパイル使用メモリ | 103,552 KB |
実行使用メモリ | 19,200 KB |
最終ジャッジ日時 | 2024-07-03 22:06:25 |
合計ジャッジ時間 | 3,810 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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(); } }