結果
問題 |
No.462 6日知らずのコンピュータ
|
ユーザー |
![]() |
提出日時 | 2016-12-13 00:39:13 |
言語 | Perl (5.40.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 349 bytes |
コンパイル時間 | 63 ms |
コンパイル使用メモリ | 6,692 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-29 23:31:41 |
合計ジャッジ時間 | 2,806 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 RE * 1 |
other | AC * 53 RE * 31 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
($n,$k)=glob<>; $r=1; for(sort{$a<=>$b}glob<>){ ++$dbg_i; $a=$_|0; if($b&~$a){ die; print 0; exit; } for(1..c($a)- c($b)){ $r=($r*$_)%(1e9+7); } $b=$a; } die if $dbg_i!=$k; die if <>; die if $b>=1<<$n; { for(1..$n- c($b)){ $r=($r*$_)%(1e9+7); } } print $r; sub c { my $v=0; my ($n)=@_; while($n){ $v+=$n&1; $n>>=1; } $v }