結果
| 問題 | No.1452 XOR×OR | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-03-16 21:45:36 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 343 bytes | 
| コンパイル時間 | 303 ms | 
| コンパイル使用メモリ | 81,760 KB | 
| 実行使用メモリ | 64,144 KB | 
| 最終ジャッジ日時 | 2024-12-14 17:18:36 | 
| 合計ジャッジ時間 | 3,931 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 2 | 
| other | AC * 2 WA * 34 | 
ソースコード
n = int(input())
x = 1
ans = 0
while x*x <= n:
    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
            cnt %= 10**9+7
        if x_bit == 1 and o_vit == 0:
            cnt = 0
    ans += cnt
    x += 1
print(ans // 2)
            
            
            
        