結果
問題 | No.1063 ルートの計算 / Sqrt Calculation |
ユーザー |
![]() |
提出日時 | 2020-06-20 23:51:27 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 28 ms / 2,000 ms |
コード長 | 473 bytes |
コンパイル時間 | 123 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-03 17:38:58 |
合計ジャッジ時間 | 1,165 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
from collections import Counter def prime_decomposition(n): i = 2 table = [1] while i*i <= n: while n%i == 0: n /= i table.append(i) i += 1 if n > 1: table.append(n) return table n = int(input()) l = Counter(prime_decomposition(n)) a = 1 b = 1 for k,v in l.items(): if v > 1: a *= (k**(v//2)) b *= (k**(v%2)) else: b *= k print(int(a),int(b))