結果

問題 No.414 衝動
ユーザー tentententen
提出日時 2020-09-11 17:39:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 168 ms / 1,000 ms
コード長 384 bytes
コンパイル時間 4,378 ms
コンパイル使用メモリ 75,412 KB
実行使用メモリ 57,000 KB
最終ジャッジ日時 2023-08-09 13:46:53
合計ジャッジ時間 7,062 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 147 ms
57,000 KB
testcase_01 AC 151 ms
56,544 KB
testcase_02 AC 148 ms
56,768 KB
testcase_03 AC 163 ms
56,744 KB
testcase_04 AC 148 ms
56,688 KB
testcase_05 AC 152 ms
55,964 KB
testcase_06 AC 157 ms
56,160 KB
testcase_07 AC 137 ms
55,996 KB
testcase_08 AC 149 ms
56,104 KB
testcase_09 AC 168 ms
56,948 KB
testcase_10 AC 138 ms
55,580 KB
testcase_11 AC 150 ms
56,536 KB
testcase_12 AC 149 ms
56,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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