結果

問題 No.36 素数が嫌い!
ユーザー kano_townkano_town
提出日時 2014-12-12 14:45:46
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 332 bytes
コンパイル時間 5,202 ms
コンパイル使用メモリ 72,496 KB
実行使用メモリ 56,348 KB
最終ジャッジ日時 2023-09-02 14:22:04
合計ジャッジ時間 8,684 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
56,040 KB
testcase_01 AC 123 ms
56,048 KB
testcase_02 AC 124 ms
56,032 KB
testcase_03 WA -
testcase_04 AC 125 ms
55,672 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 126 ms
55,944 KB
testcase_08 AC 127 ms
55,900 KB
testcase_09 AC 125 ms
56,024 KB
testcase_10 AC 123 ms
55,796 KB
testcase_11 AC 163 ms
55,772 KB
testcase_12 AC 240 ms
55,800 KB
testcase_13 AC 241 ms
55,856 KB
testcase_14 AC 125 ms
56,000 KB
testcase_15 AC 124 ms
55,784 KB
testcase_16 AC 125 ms
55,984 KB
testcase_17 AC 125 ms
55,688 KB
testcase_18 AC 124 ms
55,680 KB
testcase_19 AC 125 ms
55,660 KB
testcase_20 AC 125 ms
55,628 KB
testcase_21 AC 125 ms
55,912 KB
testcase_22 AC 123 ms
56,056 KB
testcase_23 AC 125 ms
55,976 KB
testcase_24 AC 125 ms
56,088 KB
testcase_25 AC 125 ms
56,188 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yukicoder36 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		for (long i = 2; i < Math.sqrt(n); i++) {
			if (n % i * i == 0) {
				System.out.println("YES");
				return;
			}
		}
		System.out.println("NO");
	}
}
0