結果

問題 No.414 衝動
ユーザー rpy3cpprpy3cpp
提出日時 2016-08-26 22:27:06
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 407 ms / 1,000 ms
コード長 219 bytes
コンパイル時間 679 ms
コンパイル使用メモリ 10,636 KB
実行使用メモリ 8,016 KB
最終ジャッジ日時 2023-08-09 13:19:34
合計ジャッジ時間 3,076 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,808 KB
testcase_01 AC 16 ms
7,856 KB
testcase_02 AC 16 ms
7,888 KB
testcase_03 AC 381 ms
7,884 KB
testcase_04 AC 16 ms
8,016 KB
testcase_05 AC 378 ms
7,960 KB
testcase_06 AC 383 ms
7,816 KB
testcase_07 AC 15 ms
7,780 KB
testcase_08 AC 240 ms
7,816 KB
testcase_09 AC 407 ms
7,800 KB
testcase_10 AC 15 ms
7,844 KB
testcase_11 AC 19 ms
7,840 KB
testcase_12 AC 15 ms
7,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

M = int(input())
for n in range(2, M + 1):
    m, r = divmod(M, n)
    if r == 0:
        print('{} {}'.format(n, m))
        break
    if n > m:
        print('1 {}'.format(M))
        break
if M == 1:
    print('1 1')
0