結果

問題 No.809 かけ算
ユーザー iad_2889
提出日時 2019-04-26 23:23:53
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 710 ms / 2,000 ms
コード長 326 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,776 KB
最終ジャッジ日時 2024-11-25 07:12:36
合計ジャッジ時間 2,108 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import count
from math import sqrt
def primes():
    g = count(2)
    while True:
        p = next(g)
        yield p
        g = filter(lambda n,p = p:n % p,g)

C = int(input())
for A in primes():
    if A > sqrt(C):
        A = 1
        break
    if not C % A:
        break
B = C // A
print("%d %d" % (A,B))
0