結果

問題 No.414 衝動
ユーザー brthyyjpbrthyyjp
提出日時 2020-08-09 02:53:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 1,000 ms
コード長 381 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 82,204 KB
実行使用メモリ 58,596 KB
最終ジャッジ日時 2024-04-27 08:42:14
合計ジャッジ時間 1,358 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
57,916 KB
testcase_01 AC 34 ms
52,348 KB
testcase_02 AC 34 ms
53,472 KB
testcase_03 AC 48 ms
58,036 KB
testcase_04 AC 47 ms
58,596 KB
testcase_05 AC 48 ms
57,960 KB
testcase_06 AC 47 ms
58,340 KB
testcase_07 AC 32 ms
52,472 KB
testcase_08 AC 41 ms
58,428 KB
testcase_09 AC 48 ms
58,360 KB
testcase_10 AC 34 ms
54,244 KB
testcase_11 AC 35 ms
58,008 KB
testcase_12 AC 36 ms
57,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

m = int(input())

if m == 1:
    print(1, 1)
    exit()

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

d = make_divisors(m)
if len(d) == 2:
    print(1, m)
else:
    print(d[1], m//d[1])
0