結果

問題 No.939 and or
ユーザー 💕💖💞
提出日時 2019-12-23 22:29:11
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-19 02:48:39
合計ジャッジ時間 2,008 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

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