結果
問題 |
No.643 Two Operations No.2
|
ユーザー |
![]() |
提出日時 | 2018-02-22 17:27:21 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 734 bytes |
コンパイル時間 | 1,609 ms |
コンパイル使用メモリ | 103,040 KB |
実行使用メモリ | 18,048 KB |
最終ジャッジ日時 | 2024-10-01 21:10:12 |
合計ジャッジ時間 | 2,526 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 1 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; namespace ConsoleApp1 { class Program { static void Main(string[] args) { String line = Console.ReadLine(); String[] s = line.Split(' '); int X = int.Parse(s[0]); int Y = int.Parse(s[1]); if (X == Y) Console.WriteLine(0); else if (X == 0) Console.WriteLine(2); else if (Y == 0) Console.WriteLine(1); else if(X == -Y) { if (X < 0) Console.WriteLine(3); else Console.WriteLine(1); } else Console.WriteLine(-1); } } }