結果
| 問題 | 
                            No.3108 Luke or Bishop
                             | 
                    
| コンテスト | |
| ユーザー | 
                             bluemegane
                         | 
                    
| 提出日時 | 2025-04-19 09:29:58 | 
| 言語 | C#  (.NET 8.0.404)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 61 ms / 2,000 ms | 
| コード長 | 475 bytes | 
| コンパイル時間 | 8,380 ms | 
| コンパイル使用メモリ | 173,056 KB | 
| 実行使用メモリ | 186,436 KB | 
| 最終ジャッジ日時 | 2025-04-19 09:30:22 | 
| 合計ジャッジ時間 | 11,023 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 26 | 
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (157 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System;
public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var x = int.Parse(line[0]);
        var y = int.Parse(line[1]);
        getAns(x, y);
    }
    static void getAns(int x, int y)
    {
        int ans;
        if (x == 0 && y == 0) ans = 0;
        else if (x == 0 | y == 0) ans = 1;
        else if (x == y | x == -y) ans = 1;
        else ans = 2;
        Console.WriteLine(ans);
    }
}
            
            
            
        
            
bluemegane