結果

問題 No.414 衝動
ユーザー uafr_csuafr_cs
提出日時 2016-08-26 23:36:24
言語 Java21
(openjdk 21)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 435 bytes
コンパイル時間 2,310 ms
コンパイル使用メモリ 83,024 KB
実行使用メモリ 56,796 KB
最終ジャッジ日時 2024-04-26 03:59:41
合計ジャッジ時間 6,036 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 157 ms
54,680 KB
testcase_06 AC 160 ms
54,556 KB
testcase_07 AC 145 ms
54,284 KB
testcase_08 AC 157 ms
54,412 KB
testcase_09 WA -
testcase_10 AC 146 ms
54,396 KB
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

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