結果

問題 No.939 and or
ユーザー tnodinotnodino
提出日時 2022-08-10 21:04:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 360 bytes
コンパイル時間 133 ms
コンパイル使用メモリ 11,916 KB
実行使用メモリ 10,172 KB
最終ジャッジ日時 2023-10-21 06:07:22
合計ジャッジ時間 2,128 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,076 KB
testcase_01 AC 29 ms
10,076 KB
testcase_02 WA -
testcase_03 AC 29 ms
10,076 KB
testcase_04 WA -
testcase_05 AC 29 ms
10,076 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 29 ms
10,076 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 29 ms
10,076 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 29 ms
10,076 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 29 ms
10,076 KB
testcase_21 WA -
testcase_22 AC 29 ms
10,076 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 29 ms
10,076 KB
testcase_30 AC 29 ms
10,076 KB
testcase_31 AC 29 ms
10,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B = map(int,input().split())
bit1 = [0] * 32
bit2 = [0] * 32
for i in range(32):
    if A & (1 << i):
        bit1[i] = 1
for i in range(32):
    if B & (1 << i):
        bit2[i] = 1
ans = 1
cnt = 1
for i in range(32):
    if bit1[i] == 1 and bit2[i] == 0:
        ans *= 0
    if bit1[i] == 0 and bit2[i] == 1:
        ans *= cnt
        cnt *= 2
print(ans)
0