結果

問題 No.414 衝動
ユーザー Mcpu3Mcpu3
提出日時 2018-09-20 07:52:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 148 ms / 1,000 ms
コード長 360 bytes
コンパイル時間 2,129 ms
コンパイル使用メモリ 75,936 KB
実行使用メモリ 55,412 KB
最終ジャッジ日時 2024-04-27 08:35:22
合計ジャッジ時間 4,249 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
54,664 KB
testcase_01 AC 118 ms
54,648 KB
testcase_02 AC 130 ms
54,824 KB
testcase_03 AC 148 ms
55,412 KB
testcase_04 AC 137 ms
54,752 KB
testcase_05 AC 139 ms
54,096 KB
testcase_06 AC 135 ms
53,252 KB
testcase_07 AC 119 ms
53,664 KB
testcase_08 AC 132 ms
54,276 KB
testcase_09 AC 142 ms
54,796 KB
testcase_10 AC 121 ms
54,008 KB
testcase_11 AC 123 ms
54,660 KB
testcase_12 AC 119 ms
54,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        long m=sc.nextLong(),i;
        sc.close();
        for(i=2;i<=(long)Math.sqrt(m);++i)if(1>m%i)break;
        if(i>(long)Math.sqrt(m))System.out.print("1 "+m);
        else System.out.print(m/i+" "+m/(m/i));
    }
}
0