結果

問題 No.939 and or
コンテスト
ユーザー 💕💖💞
提出日時 2019-12-23 22:29:11
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 293 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 825 ms
コンパイル使用メモリ 20,696 KB
実行使用メモリ 15,484 KB
最終ジャッジ日時 2026-04-07 07:32:43
合計ジャッジ時間 5,798 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

A,B=map(lambda x:f'{int(x):032b}',input().split())
#print(A, B)
# xor
c = [(a,b) for a, b in zip(A,B) if a != b]
c1 = [p for p in c if p == ('0','1')]
c2 = [p for p in c if p == ('1', '0')]
if len(c2) > 0:
    print(0)
elif len(c) == 0:
    print(1)
else:
    #print(c)
    print(2**len(c)//2)
0