結果

問題 No.414 衝動
ユーザー はむ吉🐹はむ吉🐹
提出日時 2016-08-26 22:25:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 160 ms / 1,000 ms
コード長 303 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 8,064 KB
最終ジャッジ日時 2023-08-09 13:18:59
合計ジャッジ時間 2,054 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,916 KB
testcase_01 AC 16 ms
7,920 KB
testcase_02 AC 15 ms
7,912 KB
testcase_03 AC 156 ms
8,008 KB
testcase_04 AC 16 ms
8,008 KB
testcase_05 AC 160 ms
7,924 KB
testcase_06 AC 155 ms
7,948 KB
testcase_07 AC 15 ms
7,916 KB
testcase_08 AC 94 ms
7,912 KB
testcase_09 AC 153 ms
8,036 KB
testcase_10 AC 16 ms
8,064 KB
testcase_11 AC 18 ms
7,888 KB
testcase_12 AC 16 ms
7,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3

import math


def solve(m):
    s = math.ceil(math.sqrt(m))
    for x in range(2, s + 1):
        y, r = divmod(m, x)
        if r == 0:
            return x, y
    else:
        return (1, m)


def main():
    print(*solve(int(input())))


if __name__ == '__main__':
    main()
0