結果

問題 No.1298 OR XOR
ユーザー keymoonkeymoon
提出日時 2020-11-27 21:28:08
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 571 bytes
コンパイル時間 2,289 ms
コンパイル使用メモリ 101,736 KB
実行使用メモリ 22,720 KB
最終ジャッジ日時 2023-10-01 04:43:17
合計ジャッジ時間 3,807 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
20,852 KB
testcase_01 AC 55 ms
22,720 KB
testcase_02 AC 55 ms
20,872 KB
testcase_03 AC 55 ms
20,824 KB
testcase_04 AC 55 ms
22,720 KB
testcase_05 AC 55 ms
20,736 KB
testcase_06 AC 58 ms
20,832 KB
testcase_07 AC 58 ms
20,784 KB
testcase_08 AC 57 ms
20,704 KB
testcase_09 AC 57 ms
18,644 KB
testcase_10 AC 58 ms
20,672 KB
testcase_11 AC 58 ms
20,624 KB
testcase_12 AC 57 ms
20,780 KB
testcase_13 AC 58 ms
22,676 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;

public static class P
{
    public static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        var lsb = n & -n;
        if (lsb == n)
        {
            Console.WriteLine("-1 -1 -1");
            return;
        }
        Console.WriteLine($"{n} {lsb} {n ^ lsb}");

    }
}
0