結果

問題 No.939 and or
ユーザー brthyyjpbrthyyjp
提出日時 2020-11-25 19:55:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 415 bytes
コンパイル時間 1,293 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 71,532 KB
最終ジャッジ日時 2023-10-01 01:52:34
合計ジャッジ時間 4,803 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
71,072 KB
testcase_01 AC 77 ms
70,968 KB
testcase_02 AC 76 ms
71,008 KB
testcase_03 AC 76 ms
71,164 KB
testcase_04 AC 77 ms
70,916 KB
testcase_05 WA -
testcase_06 AC 73 ms
71,212 KB
testcase_07 AC 73 ms
71,168 KB
testcase_08 AC 74 ms
70,592 KB
testcase_09 AC 73 ms
71,060 KB
testcase_10 AC 73 ms
71,060 KB
testcase_11 AC 74 ms
70,748 KB
testcase_12 AC 73 ms
70,980 KB
testcase_13 WA -
testcase_14 AC 73 ms
71,060 KB
testcase_15 AC 72 ms
71,156 KB
testcase_16 AC 74 ms
70,752 KB
testcase_17 AC 73 ms
71,072 KB
testcase_18 AC 74 ms
70,852 KB
testcase_19 AC 72 ms
71,056 KB
testcase_20 WA -
testcase_21 AC 74 ms
71,164 KB
testcase_22 AC 74 ms
71,300 KB
testcase_23 AC 77 ms
71,008 KB
testcase_24 AC 74 ms
71,056 KB
testcase_25 AC 74 ms
71,036 KB
testcase_26 AC 72 ms
71,096 KB
testcase_27 AC 73 ms
71,056 KB
testcase_28 AC 74 ms
71,064 KB
testcase_29 WA -
testcase_30 AC 73 ms
71,220 KB
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b = map(int, input().split())
ans = 1
a = list(format(a, 'b'))
b = list(format(b, 'b'))
a.reverse()
b.reverse()

if len(b) < len(a):
    b = b+['0']*(len(a)-len(b))
else:
    a = a+['0']*(len(b)-len(a))

for i, j in zip(a, b):
    if i == '0' and j == '1':
        ans *= 2
    elif i == '0' and j == '0':
        ans *= 1
    elif i == '1' and j == '1':
        ans *= 1
    else:
        ans = 0

print(ans//2)
0