結果

問題 No.1452 XOR×OR
ユーザー 👑 tamatotamato
提出日時 2021-03-31 15:33:58
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 620 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 86,516 KB
実行使用メモリ 75,772 KB
最終ジャッジ日時 2023-09-15 12:18:41
合計ジャッジ時間 4,659 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,472 KB
testcase_01 AC 72 ms
71,496 KB
testcase_02 AC 74 ms
75,632 KB
testcase_03 AC 71 ms
71,456 KB
testcase_04 AC 75 ms
71,288 KB
testcase_05 AC 71 ms
71,556 KB
testcase_06 AC 77 ms
75,516 KB
testcase_07 AC 76 ms
75,624 KB
testcase_08 AC 74 ms
75,588 KB
testcase_09 AC 77 ms
75,268 KB
testcase_10 AC 76 ms
75,508 KB
testcase_11 AC 74 ms
75,772 KB
testcase_12 AC 75 ms
75,628 KB
testcase_13 AC 73 ms
75,368 KB
testcase_14 AC 75 ms
75,628 KB
testcase_15 AC 74 ms
75,244 KB
testcase_16 AC 76 ms
75,460 KB
testcase_17 AC 76 ms
75,432 KB
testcase_18 AC 77 ms
75,232 KB
testcase_19 AC 77 ms
75,008 KB
testcase_20 AC 74 ms
74,928 KB
testcase_21 AC 75 ms
75,392 KB
testcase_22 AC 75 ms
75,600 KB
testcase_23 AC 75 ms
75,232 KB
testcase_24 AC 76 ms
75,512 KB
testcase_25 AC 75 ms
75,324 KB
testcase_26 AC 76 ms
75,660 KB
testcase_27 AC 76 ms
74,952 KB
testcase_28 AC 77 ms
75,600 KB
testcase_29 AC 76 ms
75,628 KB
testcase_30 AC 74 ms
75,452 KB
testcase_31 AC 75 ms
75,208 KB
testcase_32 AC 74 ms
75,668 KB
testcase_33 AC 75 ms
74,944 KB
testcase_34 AC 76 ms
75,288 KB
testcase_35 AC 74 ms
75,240 KB
testcase_36 AC 76 ms
75,396 KB
testcase_37 AC 75 ms
75,244 KB
testcase_38 AC 74 ms
75,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    N = int(input())
    ans = 0
    for a in range(1, N+1):
        if a * a > N:
            break
        if N%a == 0:
            b = N // a
            cnt = 1
            for i in range(31):
                ai = a >> i & 1
                bi = b >> i & 1
                if ai == 1 and bi == 1:
                    cnt *= 2
                elif ai == 1 and bi == 0:
                    cnt *= 0
            if cnt > 1:
                cnt //= 2
            ans += cnt
    print(ans)


if __name__ == '__main__':
    main()
0