結果
| 問題 | No.1452 XOR×OR | 
| コンテスト | |
| ユーザー |  sasa8uyauya | 
| 提出日時 | 2024-09-11 06:16:01 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 62 ms / 2,000 ms | 
| コード長 | 300 bytes | 
| コンパイル時間 | 330 ms | 
| コンパイル使用メモリ | 82,976 KB | 
| 実行使用メモリ | 59,688 KB | 
| 最終ジャッジ日時 | 2024-09-11 06:16:04 | 
| 合計ジャッジ時間 | 3,367 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 36 | 
ソースコード
n=int(input()) g=0 def solve(a,b): c=0 for i in range(33): if (a>>i)&1==1 and (b>>i)&1==0: return 0 if (a>>i)&1==1 and (b>>i)&1==1: c+=1 return 2**(c-1) if c>0 else 1 for i in range(1,10**5): if i*i>n: break if n%i==0: a=i b=n//i g+=solve(a,b) g+=solve(b,a)*(a<b) print(g)
