結果

問題 No.1452 XOR×OR
ユーザー NaHCO314NaHCO314
提出日時 2021-03-16 22:05:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 86,852 KB
実行使用メモリ 75,800 KB
最終ジャッジ日時 2023-09-15 12:14:06
合計ジャッジ時間 4,939 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,120 KB
testcase_01 AC 74 ms
71,100 KB
testcase_02 AC 79 ms
75,672 KB
testcase_03 AC 80 ms
71,008 KB
testcase_04 AC 75 ms
71,236 KB
testcase_05 AC 75 ms
71,312 KB
testcase_06 AC 78 ms
75,528 KB
testcase_07 AC 78 ms
75,488 KB
testcase_08 AC 77 ms
75,524 KB
testcase_09 AC 79 ms
75,340 KB
testcase_10 AC 80 ms
75,684 KB
testcase_11 AC 76 ms
75,396 KB
testcase_12 AC 77 ms
75,420 KB
testcase_13 AC 78 ms
75,492 KB
testcase_14 AC 78 ms
75,564 KB
testcase_15 AC 79 ms
75,792 KB
testcase_16 AC 78 ms
75,344 KB
testcase_17 AC 77 ms
75,448 KB
testcase_18 AC 78 ms
75,432 KB
testcase_19 AC 78 ms
75,516 KB
testcase_20 AC 78 ms
75,452 KB
testcase_21 AC 76 ms
75,420 KB
testcase_22 AC 78 ms
75,724 KB
testcase_23 AC 78 ms
75,532 KB
testcase_24 AC 76 ms
75,416 KB
testcase_25 AC 75 ms
75,800 KB
testcase_26 AC 77 ms
75,456 KB
testcase_27 AC 79 ms
75,436 KB
testcase_28 AC 79 ms
75,664 KB
testcase_29 AC 78 ms
75,516 KB
testcase_30 AC 80 ms
75,568 KB
testcase_31 AC 78 ms
75,492 KB
testcase_32 AC 77 ms
75,420 KB
testcase_33 AC 77 ms
75,424 KB
testcase_34 AC 78 ms
75,520 KB
testcase_35 AC 76 ms
75,800 KB
testcase_36 AC 78 ms
75,532 KB
testcase_37 AC 77 ms
75,668 KB
testcase_38 AC 77 ms
75,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = 1
ans = 0

while x*x <= n:
    if n % x != 0:
        x += 1
        continue
    o = n // x
    cnt = 1
    for i in range(60):
        x_bit = (x >> i) & 1
        o_vit = (o >> i) & 1
        if x_bit == 1 and o_vit == 1:
            cnt *= 2
        if x_bit == 1 and o_vit == 0:
            cnt = 0
    ans += cnt
    x += 1

print(ans // 2)
0