結果

問題 No.1452 XOR×OR
ユーザー あかりきあかりき
提出日時 2021-04-13 01:44:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 711 bytes
コンパイル時間 486 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 82,480 KB
最終ジャッジ日時 2023-09-11 06:15:52
合計ジャッジ時間 10,666 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 176 ms
82,080 KB
testcase_01 AC 267 ms
77,800 KB
testcase_02 WA -
testcase_03 AC 171 ms
76,896 KB
testcase_04 AC 169 ms
77,644 KB
testcase_05 AC 170 ms
77,488 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)):
  x=format(d[i],'016b')
  for j in range(2**16):
    x1=[]
    x2=[]
    b=format(j,'016b')
    for j2 in range(16):
      if x[j2]=='0':
        if b[j2]=='0':
          x1.append(0)
          x2.append(0)
        else:
          x1.append(1)
          x2.append(1)
      else:
        if b[j2]=='0':
          x1.append(0)
          x2.append(1)
        else:
          x1.append(1)
          x2.append(0)
    X1=0
    X2=0
    x1.reverse()
    x2.reverse()
    for j2 in range(16):
      X1+=x1[j2]*2**j2
      X2+=x2[j2]*2**j2
    if X1|X2==n//d[i]:
      ans+=1

print(ans//2)
0