結果
| 問題 | No.1452 XOR×OR |
| コンテスト | |
| ユーザー |
あかりき
|
| 提出日時 | 2021-04-13 02:12:05 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 34 ms / 2,000 ms |
| コード長 | 326 bytes |
| 記録 | |
| コンパイル時間 | 255 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 58,752 KB |
| 最終ジャッジ日時 | 2026-03-23 23:37:23 |
| 合計ジャッジ時間 | 2,340 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 36 |
ソースコード
n=int(input())
d=[]
for i in range(1,int(n**0.5)+2):
if n%i==0:
if i*i<=n:
d.append(i)
ans=0
for i in range(len(d)):
ct=1
x=format(d[i],'032b')
x2=format(n//d[i],'032b')
for j in range(32):
if x[j]=='1' and x2[j]=='1':
ct*=2
elif x[j]=='1' and x2[j]=='0':
ct*=0
ans+=ct
print(ans//2)
あかりき