結果

問題 No.414 衝動
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-03-26 21:48:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 152 ms / 1,000 ms
コード長 384 bytes
コンパイル時間 2,167 ms
コンパイル使用メモリ 76,856 KB
実行使用メモリ 55,144 KB
最終ジャッジ日時 2024-04-27 08:33:37
合計ジャッジ時間 4,294 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
55,004 KB
testcase_01 AC 129 ms
54,648 KB
testcase_02 AC 134 ms
55,016 KB
testcase_03 AC 151 ms
55,144 KB
testcase_04 AC 119 ms
54,684 KB
testcase_05 AC 134 ms
54,124 KB
testcase_06 AC 139 ms
54,072 KB
testcase_07 AC 126 ms
54,288 KB
testcase_08 AC 130 ms
54,152 KB
testcase_09 AC 152 ms
55,072 KB
testcase_10 AC 112 ms
53,052 KB
testcase_11 AC 133 ms
55,072 KB
testcase_12 AC 121 ms
54,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import static java.lang.System.*;
import java.util.*;

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