結果

問題 No.1452 XOR×OR
ユーザー 👑 KazunKazun
提出日時 2021-07-15 22:44:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 574 bytes
コンパイル時間 641 ms
コンパイル使用メモリ 87,220 KB
実行使用メモリ 75,648 KB
最終ジャッジ日時 2023-09-18 07:52:23
合計ジャッジ時間 5,742 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,264 KB
testcase_01 AC 75 ms
71,320 KB
testcase_02 AC 80 ms
75,488 KB
testcase_03 AC 76 ms
71,572 KB
testcase_04 AC 74 ms
71,244 KB
testcase_05 AC 74 ms
71,376 KB
testcase_06 AC 77 ms
75,488 KB
testcase_07 AC 77 ms
75,296 KB
testcase_08 AC 79 ms
75,352 KB
testcase_09 AC 80 ms
75,548 KB
testcase_10 AC 78 ms
75,356 KB
testcase_11 AC 78 ms
75,460 KB
testcase_12 AC 78 ms
75,508 KB
testcase_13 AC 78 ms
75,360 KB
testcase_14 AC 77 ms
75,560 KB
testcase_15 AC 77 ms
75,188 KB
testcase_16 AC 78 ms
75,460 KB
testcase_17 AC 78 ms
75,456 KB
testcase_18 AC 76 ms
75,624 KB
testcase_19 AC 79 ms
75,548 KB
testcase_20 AC 78 ms
75,280 KB
testcase_21 AC 78 ms
75,568 KB
testcase_22 AC 78 ms
75,512 KB
testcase_23 AC 78 ms
75,484 KB
testcase_24 AC 77 ms
75,404 KB
testcase_25 AC 78 ms
75,408 KB
testcase_26 AC 77 ms
75,452 KB
testcase_27 AC 76 ms
75,460 KB
testcase_28 AC 78 ms
75,400 KB
testcase_29 AC 78 ms
75,648 KB
testcase_30 AC 84 ms
75,644 KB
testcase_31 AC 78 ms
75,532 KB
testcase_32 AC 79 ms
75,504 KB
testcase_33 AC 78 ms
75,508 KB
testcase_34 AC 79 ms
75,428 KB
testcase_35 AC 78 ms
75,548 KB
testcase_36 AC 78 ms
75,484 KB
testcase_37 AC 77 ms
75,436 KB
testcase_38 AC 79 ms
75,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def Divisors(N):
    N=abs(N)
    L,U=[],[]
    k=1
    while k*k <=N:
        if N%k== 0:
            L.append(k)
            if k*k!=N:
                U.append(N//k)
        k+=1
    return L+U[::-1]
#==================================================
N=int(input())
D=Divisors(N)

K=0
for x in D:
    y=N//x

    M=1
    while x or y:
        if x%2==0:
            x>>=1; y>>=1
            continue

        if y%2==0:
            M=0
            break
        else:
            M*=2

        x>>=1; y>>=1

    if M==1:
        K+=1
    else:
        K+=M//2

print(K)
0