結果

問題 No.414 衝動
ユーザー Mcpu3
提出日時 2018-09-20 07:52:20
言語 Java
(openjdk 23)
結果
AC  
実行時間 183 ms / 1,000 ms
コード長 360 bytes
コンパイル時間 2,283 ms
コンパイル使用メモリ 77,296 KB
実行使用メモリ 55,012 KB
最終ジャッジ日時 2024-11-15 09:20:10
合計ジャッジ時間 5,427 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

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