結果

問題 No.537 ユーザーID
ユーザー liny_tailliny_tail
提出日時 2020-09-15 23:21:38
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 721 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 68,256 KB
最終ジャッジ日時 2024-06-22 02:51:51
合計ジャッジ時間 5,255 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 WA * 2 TLE * 1 -- * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

def fint(number):
  lst = [1]
  
  while True:
    if number % 2 == 0:
      lst.append(2)
      number //= 2
    else:
      break
  
  num = 3
  
  while True:
    #print num
    if number ** 0.5 < num:
      lst.append(number)
      break
    
    if number % num == 0:
      lst.append(num)
      number //= num
    else:
      num += 2
  
  return lst

a = int(input().strip())

lst = fint(a)

if len(set(lst)) == 1:
  print(1)
  exit(0)

lst2 = []
for i in range(2, len(lst)):
  for j in itertools.combinations(lst, r=i):
    tmp = eval('*'.join([str(k) for k in j]))
    lst2.append([tmp, a // tmp])
    lst2.append([a // tmp, tmp])

print(len(set([''.join([str(j) for j in i]) for i in lst2])))
0