結果

問題 No.312 置換処理
ユーザー hhgfhn1hhgfhn1
提出日時 2018-10-23 18:59:38
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 2,368 ms
コンパイル使用メモリ 74,164 KB
実行使用メモリ 56,152 KB
最終ジャッジ日時 2024-04-29 21:04:18
合計ジャッジ時間 9,250 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
41,024 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 130 ms
41,076 KB
testcase_06 AC 129 ms
40,832 KB
testcase_07 AC 128 ms
41,276 KB
testcase_08 AC 101 ms
41,528 KB
testcase_09 AC 124 ms
41,264 KB
testcase_10 AC 119 ms
41,312 KB
testcase_11 AC 125 ms
41,244 KB
testcase_12 AC 115 ms
39,892 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 109 ms
40,968 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 119 ms
40,576 KB
testcase_36 AC 103 ms
41,100 KB
testcase_37 AC 112 ms
39,660 KB
testcase_38 WA -
testcase_39 AC 112 ms
40,228 KB
testcase_40 AC 125 ms
41,328 KB
testcase_41 AC 126 ms
41,020 KB
testcase_42 AC 126 ms
41,132 KB
testcase_43 AC 121 ms
41,000 KB
testcase_44 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		long n=scanner.nextLong();
		for(int i=3;i<=Math.sqrt(n);i+=2) {
			if(n%i==0) {
				System.out.println(i);
				return;
			}
		}
	}
}
0