結果

問題 No.1047 Zero (Novice)
ユーザー curryudon08curryudon08
提出日時 2020-07-28 10:44:12
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 501 bytes
コンパイル時間 1,998 ms
コンパイル使用メモリ 105,620 KB
実行使用メモリ 22,740 KB
最終ジャッジ日時 2023-09-11 06:22:02
合計ジャッジ時間 4,269 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
18,852 KB
testcase_01 AC 57 ms
20,724 KB
testcase_02 AC 57 ms
20,624 KB
testcase_03 AC 58 ms
20,692 KB
testcase_04 AC 58 ms
20,900 KB
testcase_05 AC 57 ms
18,580 KB
testcase_06 AC 57 ms
20,872 KB
testcase_07 AC 57 ms
22,644 KB
testcase_08 WA -
testcase_09 AC 57 ms
22,732 KB
testcase_10 AC 57 ms
18,700 KB
testcase_11 AC 57 ms
20,744 KB
testcase_12 AC 58 ms
18,848 KB
testcase_13 AC 59 ms
22,740 KB
testcase_14 AC 58 ms
20,648 KB
testcase_15 AC 57 ms
20,700 KB
testcase_16 AC 58 ms
22,732 KB
testcase_17 AC 58 ms
20,836 KB
testcase_18 WA -
testcase_19 AC 57 ms
20,688 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace _1047
{
    class Program
    {
        static void Main(string[] args)
        {
            var _ = Console.ReadLine().Split();
            var a = long.Parse(_[0]);
            var b = long.Parse(_[1]);

            if(a < 0 && b % a == 0){
                var t = a * -1;
                Console.WriteLine(b / t);
            }else if(b == 0){
                Console.WriteLine(1);
            }else{
                Console.WriteLine(-1);
            }
        }
    }
}
0