結果

問題 No.1452 XOR×OR
ユーザー nasubi24nasubi24
提出日時 2021-03-31 14:57:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 453 bytes
コンパイル時間 1,090 ms
コンパイル使用メモリ 87,276 KB
実行使用メモリ 75,728 KB
最終ジャッジ日時 2023-09-15 12:17:35
合計ジャッジ時間 4,845 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,400 KB
testcase_01 AC 74 ms
71,016 KB
testcase_02 AC 77 ms
75,404 KB
testcase_03 AC 74 ms
71,004 KB
testcase_04 AC 74 ms
71,008 KB
testcase_05 AC 73 ms
70,732 KB
testcase_06 AC 78 ms
75,608 KB
testcase_07 AC 77 ms
75,288 KB
testcase_08 AC 78 ms
75,668 KB
testcase_09 AC 78 ms
75,424 KB
testcase_10 AC 76 ms
75,252 KB
testcase_11 AC 76 ms
75,384 KB
testcase_12 AC 76 ms
75,056 KB
testcase_13 AC 76 ms
75,036 KB
testcase_14 AC 74 ms
75,388 KB
testcase_15 AC 76 ms
75,264 KB
testcase_16 AC 76 ms
75,276 KB
testcase_17 AC 76 ms
75,728 KB
testcase_18 AC 76 ms
75,224 KB
testcase_19 AC 79 ms
75,580 KB
testcase_20 AC 77 ms
75,604 KB
testcase_21 AC 76 ms
75,064 KB
testcase_22 AC 76 ms
75,420 KB
testcase_23 AC 76 ms
75,488 KB
testcase_24 AC 75 ms
75,464 KB
testcase_25 AC 75 ms
75,608 KB
testcase_26 AC 77 ms
75,728 KB
testcase_27 AC 76 ms
75,608 KB
testcase_28 AC 74 ms
75,388 KB
testcase_29 AC 77 ms
75,060 KB
testcase_30 AC 77 ms
75,256 KB
testcase_31 AC 76 ms
75,540 KB
testcase_32 AC 75 ms
75,152 KB
testcase_33 AC 76 ms
74,892 KB
testcase_34 AC 75 ms
75,680 KB
testcase_35 AC 75 ms
75,276 KB
testcase_36 AC 76 ms
75,148 KB
testcase_37 AC 76 ms
75,604 KB
testcase_38 AC 75 ms
75,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n=int(input())
ans=0
for i in range(1,int(math.sqrt(n))+1):
    if n%i==0:
        m=n//i
        n1=bin(i)[2:]
        m1=bin(m)[2:]
        n1="0"*(len(m1)-len(n1))+n1
        cnt=1
        yn=True
        for j in range(len(m1)):
            if n1[j]==m1[j] and n1[j]=="1":
                cnt*=2
            elif n1[j]=="1" and m1[j]=="0":
                yn=False
                break
        if yn:
            ans+=cnt//2
print(ans)
0