結果

問題 No.36 素数が嫌い!
ユーザー irisAshirisAsh
提出日時 2017-08-15 17:48:06
言語 JavaScript
(node v21.7.1)
結果
WA  
実行時間 -
コード長 319 bytes
コンパイル時間 65 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 44,928 KB
最終ジャッジ日時 2024-04-21 01:53:47
合計ジャッジ時間 21,300 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
39,040 KB
testcase_01 AC 1,432 ms
44,928 KB
testcase_02 AC 61 ms
39,168 KB
testcase_03 AC 74 ms
39,168 KB
testcase_04 WA -
testcase_05 AC 68 ms
42,496 KB
testcase_06 AC 68 ms
42,624 KB
testcase_07 AC 68 ms
42,496 KB
testcase_08 AC 63 ms
38,912 KB
testcase_09 AC 62 ms
38,912 KB
testcase_10 AC 65 ms
39,040 KB
testcase_11 AC 757 ms
44,672 KB
testcase_12 AC 1,729 ms
44,672 KB
testcase_13 AC 1,729 ms
44,544 KB
testcase_14 AC 78 ms
43,520 KB
testcase_15 AC 63 ms
39,040 KB
testcase_16 AC 66 ms
39,040 KB
testcase_17 AC 66 ms
39,040 KB
testcase_18 AC 66 ms
38,912 KB
testcase_19 AC 879 ms
44,672 KB
testcase_20 AC 1,732 ms
44,800 KB
testcase_21 AC 1,409 ms
44,800 KB
testcase_22 AC 1,423 ms
44,672 KB
testcase_23 AC 982 ms
44,800 KB
testcase_24 AC 1,062 ms
44,800 KB
testcase_25 AC 65 ms
39,040 KB
testcase_26 AC 1,178 ms
44,672 KB
testcase_27 AC 1,515 ms
44,672 KB
testcase_28 AC 1,156 ms
44,928 KB
testcase_29 AC 1,702 ms
44,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

let i = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')[0]
let d = 0
if (i % 2 == 0) {
  d++
  if (i % 4 == 0) d++
}
if (d < 2) {
  for (let c = 3; c*c < i; c+=2) {
    if (i % c == 0) {
      d++
      if (i % (c * c) == 0) {
        d++
        break
      }
    }
  }
}
console.log(d > 1 ? 'YES' : 'NO')
0