結果

問題 No.1674 Introduction to XOR
ユーザー neko_the_shadow
提出日時 2021-10-13 19:21:34
言語 Perl
(5.40.0)
結果
AC  
実行時間 7 ms / 1,000 ms
コード長 195 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-17 16:20:53
合計ジャッジ時間 1,058 ms
ジャッジサーバーID
(参考情報)
judge6 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use strict;
use warnings;
use List::Util qw(first);

my $n = <>;
my @a = split / /, <>;

for (my $x = 1; ; $x *= 2) {
    unless (first {$_ & $x} @a) {
        print "$x\n";
        exit;
    }
}
0