結果

問題 No.414 衝動
ユーザー mesame3993mesame3993
提出日時 2021-11-16 15:15:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 1,000 ms
コード長 430 bytes
コンパイル時間 961 ms
コンパイル使用メモリ 86,900 KB
実行使用メモリ 75,588 KB
最終ジャッジ日時 2023-08-22 15:09:54
合計ジャッジ時間 2,346 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
75,400 KB
testcase_01 AC 69 ms
71,404 KB
testcase_02 AC 70 ms
71,044 KB
testcase_03 AC 87 ms
75,420 KB
testcase_04 AC 88 ms
75,424 KB
testcase_05 AC 89 ms
75,384 KB
testcase_06 AC 88 ms
75,172 KB
testcase_07 AC 69 ms
71,312 KB
testcase_08 AC 82 ms
75,588 KB
testcase_09 AC 89 ms
75,392 KB
testcase_10 AC 69 ms
71,472 KB
testcase_11 AC 71 ms
75,360 KB
testcase_12 AC 74 ms
75,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def make_divisors(n):
  lower_divisors, upper_divisors = [], []
  i = 1
  while i*i <= n:
    if n % i == 0:
      lower_divisors.append(i)
      if i != n // i:
        upper_divisors.append(n//i)
    i += 1
  return lower_divisors + upper_divisors[::-1]

def main():
  from sys import stdin
  input=stdin.readline
  m = int(input())
  f = make_divisors(m)
  if len(f) > 2:
    print(f[1], m//f[1])
  else:
    print(1, m)
main()
0