結果

問題 No.36 素数が嫌い!
ユーザー takeya_okinotakeya_okino
提出日時 2019-08-24 23:37:51
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 434 bytes
コンパイル時間 2,344 ms
コンパイル使用メモリ 74,584 KB
実行使用メモリ 60,828 KB
最終ジャッジ日時 2024-04-22 14:06:02
合計ジャッジ時間 10,959 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 125 ms
40,132 KB
testcase_03 AC 134 ms
41,176 KB
testcase_04 AC 138 ms
41,176 KB
testcase_05 AC 138 ms
41,336 KB
testcase_06 AC 137 ms
41,224 KB
testcase_07 AC 139 ms
41,504 KB
testcase_08 WA -
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {

  static long p = 0;

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    func(n);
    String ans = "NO";
    if(p >= 3) ans = "YES";
    System.out.println(ans);
  }

  public static void func(long n) {
    for(long i = 2; (i * i) <= n; i++) {
      if((n % i) == 0) {
        func(i);
        func(n / i);
      }
    }
  }
}
0