結果
| 問題 | No.1047 Zero (Novice) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-28 10:44:12 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 501 bytes |
| 記録 | |
| コンパイル時間 | 547 ms |
| コンパイル使用メモリ | 110,244 KB |
| 実行使用メモリ | 26,776 KB |
| 最終ジャッジ日時 | 2026-03-17 23:28:36 |
| 合計ジャッジ時間 | 1,714 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 2 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
}
}
}
}