結果

問題 No.1047 Zero (Novice)
ユーザー bluemeganebluemegane
提出日時 2020-05-09 19:57:48
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 400 bytes
コンパイル時間 1,012 ms
コンパイル使用メモリ 63,324 KB
実行使用メモリ 22,876 KB
最終ジャッジ日時 2023-09-20 09:02:53
合計ジャッジ時間 3,416 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
22,732 KB
testcase_01 AC 58 ms
18,692 KB
testcase_02 AC 57 ms
20,732 KB
testcase_03 AC 58 ms
22,780 KB
testcase_04 AC 58 ms
20,812 KB
testcase_05 AC 58 ms
20,884 KB
testcase_06 AC 57 ms
20,856 KB
testcase_07 AC 58 ms
20,680 KB
testcase_08 AC 58 ms
20,672 KB
testcase_09 AC 58 ms
22,876 KB
testcase_10 AC 58 ms
20,700 KB
testcase_11 AC 58 ms
22,672 KB
testcase_12 AC 58 ms
20,876 KB
testcase_13 AC 58 ms
20,668 KB
testcase_14 AC 59 ms
22,676 KB
testcase_15 AC 59 ms
20,836 KB
testcase_16 AC 57 ms
20,676 KB
testcase_17 AC 59 ms
20,736 KB
testcase_18 AC 58 ms
20,684 KB
testcase_19 AC 58 ms
22,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = int.Parse(line[0]);
        var b = int.Parse(line[1]);
        var ans = getAns(a, b);
        Console.WriteLine(ans);
    }
    static int getAns (int a, int b)
    {
        if (b == 0) return 1;
        if (a == -1) return 2;
        return -1;
    }
}
0