結果

問題 No.1452 XOR×OR
ユーザー roarisroaris
提出日時 2021-04-02 19:53:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 370 bytes
コンパイル時間 714 ms
コンパイル使用メモリ 87,400 KB
実行使用メモリ 76,136 KB
最終ジャッジ日時 2023-09-15 12:22:28
合計ジャッジ時間 5,110 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,500 KB
testcase_01 AC 71 ms
71,660 KB
testcase_02 AC 74 ms
75,872 KB
testcase_03 AC 73 ms
71,088 KB
testcase_04 AC 70 ms
71,584 KB
testcase_05 AC 71 ms
71,448 KB
testcase_06 AC 74 ms
75,928 KB
testcase_07 AC 76 ms
75,876 KB
testcase_08 AC 75 ms
75,860 KB
testcase_09 AC 73 ms
75,856 KB
testcase_10 AC 75 ms
76,132 KB
testcase_11 AC 75 ms
75,848 KB
testcase_12 AC 76 ms
75,876 KB
testcase_13 AC 74 ms
76,056 KB
testcase_14 AC 74 ms
75,772 KB
testcase_15 AC 73 ms
76,136 KB
testcase_16 AC 75 ms
75,840 KB
testcase_17 AC 74 ms
75,816 KB
testcase_18 AC 75 ms
75,772 KB
testcase_19 AC 73 ms
76,056 KB
testcase_20 AC 75 ms
75,884 KB
testcase_21 AC 74 ms
75,868 KB
testcase_22 AC 75 ms
75,812 KB
testcase_23 AC 75 ms
75,812 KB
testcase_24 AC 75 ms
75,740 KB
testcase_25 AC 74 ms
76,044 KB
testcase_26 AC 76 ms
76,084 KB
testcase_27 AC 76 ms
75,744 KB
testcase_28 AC 73 ms
75,872 KB
testcase_29 AC 75 ms
75,848 KB
testcase_30 AC 75 ms
76,100 KB
testcase_31 AC 74 ms
75,804 KB
testcase_32 AC 74 ms
75,888 KB
testcase_33 AC 73 ms
75,616 KB
testcase_34 AC 74 ms
75,892 KB
testcase_35 AC 75 ms
76,100 KB
testcase_36 AC 74 ms
75,744 KB
testcase_37 AC 75 ms
75,856 KB
testcase_38 AC 76 ms
76,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(a, b):
    global ans
    
    c = 0
    
    for i in range(35):
        if (a>>i)&1 and not (b>>i)&1:
            return
        elif (a>>i)&1 and (b>>i)&1:
            c += 1
    
    ans += pow(2, c-1)

N = int(input())
ans = 0

for a in range(1, int(N**0.5)+1):
    if N%a==0:
        f(a, N//a)
        
        if a!=N//a:
            f(N//a, a)

print(ans)
0