結果

問題 No.414 衝動
ユーザー uafr_csuafr_cs
提出日時 2016-08-26 22:25:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 165 ms / 1,000 ms
コード長 431 bytes
コンパイル時間 2,506 ms
コンパイル使用メモリ 77,912 KB
実行使用メモリ 57,216 KB
最終ジャッジ日時 2023-08-09 13:19:08
合計ジャッジ時間 5,463 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 150 ms
54,988 KB
testcase_01 AC 150 ms
56,908 KB
testcase_02 AC 152 ms
56,456 KB
testcase_03 AC 165 ms
56,764 KB
testcase_04 AC 147 ms
56,788 KB
testcase_05 AC 155 ms
55,992 KB
testcase_06 AC 155 ms
55,940 KB
testcase_07 AC 138 ms
56,036 KB
testcase_08 AC 149 ms
56,060 KB
testcase_09 AC 164 ms
57,216 KB
testcase_10 AC 140 ms
56,052 KB
testcase_11 AC 151 ms
56,492 KB
testcase_12 AC 150 ms
56,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Set;

public class Main {

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

}
0