結果

問題 No.1452 XOR×OR
ユーザー gorugo30gorugo30
提出日時 2021-03-31 15:34:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 406 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 87,180 KB
実行使用メモリ 76,192 KB
最終ジャッジ日時 2023-09-15 12:18:46
合計ジャッジ時間 4,726 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,640 KB
testcase_01 AC 71 ms
71,900 KB
testcase_02 AC 75 ms
75,620 KB
testcase_03 AC 71 ms
71,032 KB
testcase_04 AC 73 ms
71,568 KB
testcase_05 AC 70 ms
71,648 KB
testcase_06 AC 75 ms
75,864 KB
testcase_07 AC 78 ms
75,720 KB
testcase_08 AC 73 ms
76,032 KB
testcase_09 AC 74 ms
76,004 KB
testcase_10 AC 78 ms
76,092 KB
testcase_11 AC 75 ms
75,868 KB
testcase_12 AC 74 ms
76,000 KB
testcase_13 AC 76 ms
75,616 KB
testcase_14 AC 76 ms
75,992 KB
testcase_15 AC 77 ms
75,956 KB
testcase_16 AC 77 ms
75,960 KB
testcase_17 AC 75 ms
75,984 KB
testcase_18 AC 75 ms
76,008 KB
testcase_19 AC 75 ms
76,044 KB
testcase_20 AC 75 ms
76,080 KB
testcase_21 AC 75 ms
76,004 KB
testcase_22 AC 74 ms
75,772 KB
testcase_23 AC 74 ms
76,000 KB
testcase_24 AC 76 ms
75,984 KB
testcase_25 AC 75 ms
76,192 KB
testcase_26 AC 75 ms
76,004 KB
testcase_27 AC 75 ms
75,896 KB
testcase_28 AC 75 ms
75,900 KB
testcase_29 AC 75 ms
75,996 KB
testcase_30 AC 76 ms
75,616 KB
testcase_31 AC 74 ms
75,960 KB
testcase_32 AC 75 ms
76,076 KB
testcase_33 AC 74 ms
75,616 KB
testcase_34 AC 75 ms
76,144 KB
testcase_35 AC 74 ms
75,900 KB
testcase_36 AC 74 ms
75,984 KB
testcase_37 AC 77 ms
75,992 KB
testcase_38 AC 77 ms
75,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
D = []
for i in range(1, int(N ** 0.5) + 1):
    if N % i == 0:
        D.append(i)
        if N // i != i:
            D.append(N // i)

ans = 0
for d in D:
    tmp = 1
    p = N // d
    while d > 0 or p > 0:
        t = (d % 2, p % 2)
        d //= 2
        p //= 2
        if t == (1, 0):
            tmp = 0
        if t == (1, 1):
            tmp *= 2
    ans += tmp // 2
print(ans)
0