結果

問題 No.414 衝動
ユーザー Mcpu3Mcpu3
提出日時 2018-04-14 22:06:04
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 389 bytes
コンパイル時間 2,175 ms
コンパイル使用メモリ 73,764 KB
実行使用メモリ 61,252 KB
最終ジャッジ日時 2023-09-09 05:29:12
合計ジャッジ時間 6,141 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 155 ms
61,252 KB
testcase_01 AC 153 ms
57,068 KB
testcase_02 AC 155 ms
56,968 KB
testcase_03 AC 171 ms
56,816 KB
testcase_04 AC 156 ms
56,604 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no414{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		long m=stdIn.nextLong();
		int a=0;
		long b=0;
		boolean tf=false;
		for(int i=2;i<m;i++) {
			if(m%i==0) {
				a=i;
				b=m/i;
				tf=true;
				break;
			}
		}
		if(tf==true) System.out.println(a+" "+b);
		else System.out.println("1 "+m);
	}
}
0