結果

問題 No.822 Bitwise AND
ユーザー %20%20
提出日時 2019-04-26 22:23:42
言語 Perl
(5.38.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 143 bytes
コンパイル時間 340 ms
コンパイル使用メモリ 5,328 KB
実行使用メモリ 5,408 KB
最終ジャッジ日時 2023-09-08 01:09:32
合計ジャッジ時間 1,608 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 10 ms
5,156 KB
testcase_02 AC 65 ms
5,160 KB
testcase_03 AC 65 ms
5,408 KB
testcase_04 AC 10 ms
5,152 KB
testcase_05 AC 6 ms
5,244 KB
testcase_06 AC 7 ms
5,052 KB
testcase_07 AC 10 ms
5,276 KB
testcase_08 AC 6 ms
5,384 KB
testcase_09 AC 6 ms
5,144 KB
testcase_10 AC 6 ms
5,356 KB
testcase_11 AC 10 ms
5,364 KB
testcase_12 AC 6 ms
5,188 KB
testcase_13 AC 10 ms
5,148 KB
testcase_14 AC 66 ms
5,352 KB
testcase_15 AC 7 ms
5,288 KB
testcase_16 AC 21 ms
5,180 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($N,$K)=glob<>;
$h{$N|$_}=0for 0..511;
for$x(keys%h){
	for$y(keys%h){
		if($x<=$y&&($x&$y)==$N&&$y-$x<=$K){
			++$%
		}
	}
}
print$N<$K?INF:$%
0