結果

問題 No.1063 ルートの計算 / Sqrt Calculation
ユーザー 👑 KazunKazun
提出日時 2022-12-11 04:01:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 82,796 KB
実行使用メモリ 58,508 KB
最終ジャッジ日時 2024-04-23 03:51:18
合計ジャッジ時間 2,180 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,824 KB
testcase_01 AC 37 ms
53,008 KB
testcase_02 AC 37 ms
53,356 KB
testcase_03 AC 38 ms
52,756 KB
testcase_04 AC 38 ms
52,068 KB
testcase_05 AC 37 ms
53,664 KB
testcase_06 AC 38 ms
52,420 KB
testcase_07 AC 42 ms
57,944 KB
testcase_08 AC 41 ms
57,192 KB
testcase_09 AC 41 ms
57,544 KB
testcase_10 AC 40 ms
57,112 KB
testcase_11 AC 40 ms
58,452 KB
testcase_12 AC 41 ms
58,508 KB
testcase_13 AC 40 ms
57,524 KB
testcase_14 AC 40 ms
58,236 KB
testcase_15 AC 37 ms
53,956 KB
testcase_16 AC 40 ms
57,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    N=int(input())

    p=2
    a,b=1,N
    while p*p<=b:
        while b%(p*p)==0:
            a*=p
            b//=p*p
        p+=1

    return a,b
#==================================================
print(*solve())
0