結果
| 問題 | No.462 6日知らずのコンピュータ |
| コンテスト | |
| ユーザー |
taba
|
| 提出日時 | 2017-04-03 12:30:02 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 96 ms / 2,000 ms |
| コード長 | 273 bytes |
| 記録 | |
| コンパイル時間 | 531 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 15,580 KB |
| 最終ジャッジ日時 | 2026-03-29 19:24:13 |
| 合計ジャッジ時間 | 10,843 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 84 |
ソースコード
import math n,k=map(int,input().split()) b=lambda x:sum(i=="1" for i in bin(x)) if k<1: a=[] else: a=sorted(map(int,input().split())) f=0 c=1 for i in a: if i&f!=f: print(0) exit() t=b(i^f) c*=math.factorial(t) f=i t=n-b(f) c*=math.factorial(t) print(c%(10**9+7))
taba