結果
問題 | No.1298 OR XOR |
ユーザー |
|
提出日時 | 2024-08-30 10:19:00 |
言語 | C# (.NET 8.0.404) |
結果 |
AC
|
実行時間 | 56 ms / 2,000 ms |
コード長 | 759 bytes |
コンパイル時間 | 8,071 ms |
コンパイル使用メモリ | 166,808 KB |
実行使用メモリ | 184,808 KB |
最終ジャッジ日時 | 2024-08-30 10:19:10 |
合計ジャッジ時間 | 9,747 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 13 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (96 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System;using System.Numerics;public class Program{static void Main(){var n = (int)ReadLineLong()[0];if (BitOperations.PopCount((uint)n) <= 1){Console.WriteLine("-1 -1 -1");return;}var b = 0;for (var i = 1; ; i <<= 1){if ((i & n) != 0){b = i;break;}}Console.WriteLine($"{n} {b} {n ^ b}");}static string[] ReadLineSplit(){var s = Console.ReadLine() ?? "";return s.Split(' ');}static long[] ReadLineLong(){var s = Console.ReadLine() ?? "";return s.Split(' ').Select(long.Parse).ToArray();}}