結果

問題 No.414 衝動
ユーザー nCk_cvnCk_cv
提出日時 2016-08-27 21:34:16
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 330 bytes
コンパイル時間 2,204 ms
コンパイル使用メモリ 76,384 KB
実行使用メモリ 61,916 KB
最終ジャッジ日時 2024-04-26 07:02:07
合計ジャッジ時間 5,851 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 159 ms
61,916 KB
testcase_01 AC 153 ms
54,788 KB
testcase_02 AC 151 ms
54,876 KB
testcase_03 AC 159 ms
54,504 KB
testcase_04 AC 151 ms
55,044 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main {
		public static void main(String[] args) {
			Scanner sc = new Scanner(System.in);
			long M = sc.nextLong();
			long ans = 1;
			for(int i = 2; i*i <= M; i++) {
				if(M % i == 0) {
					ans = i;
					M /= i;
					break;
				}
			}
			System.out.println(ans + " " + M);
			
		}
		
}
0