結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1,334 ms
44,544 KB
testcase_02 AC 58 ms
38,400 KB
testcase_03 AC 57 ms
38,656 KB
testcase_04 AC 57 ms
38,272 KB
testcase_05 AC 65 ms
41,984 KB
testcase_06 AC 67 ms
42,368 KB
testcase_07 AC 69 ms
42,240 KB
testcase_08 AC 60 ms
38,528 KB
testcase_09 WA -
testcase_10 AC 62 ms
42,112 KB
testcase_11 AC 726 ms
44,032 KB
testcase_12 AC 1,644 ms
44,416 KB
testcase_13 AC 1,630 ms
44,160 KB
testcase_14 AC 72 ms
43,264 KB
testcase_15 AC 57 ms
38,272 KB
testcase_16 AC 59 ms
38,400 KB
testcase_17 AC 57 ms
38,656 KB
testcase_18 WA -
testcase_19 AC 814 ms
44,032 KB
testcase_20 AC 1,614 ms
44,288 KB
testcase_21 AC 1,307 ms
44,160 KB
testcase_22 AC 1,340 ms
44,416 KB
testcase_23 AC 930 ms
44,160 KB
testcase_24 AC 1,003 ms
44,416 KB
testcase_25 AC 57 ms
38,656 KB
testcase_26 AC 1,104 ms
44,160 KB
testcase_27 AC 1,447 ms
44,160 KB
testcase_28 AC 1,083 ms
44,160 KB
testcase_29 AC 1,709 ms
44,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

let i = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')[0]
let d = 0
if (i % 2 == 0) d++
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