結果

問題 No.36 素数が嫌い!
ユーザー むらためむらため
提出日時 2017-08-13 15:07:01
言語 Nim
(2.0.2)
結果
AC  
実行時間 14 ms / 5,000 ms
コード長 319 bytes
コンパイル時間 4,929 ms
コンパイル使用メモリ 77,284 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-12 14:28:06
合計ジャッジ時間 6,118 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
4,376 KB
testcase_01 AC 13 ms
4,380 KB
testcase_02 AC 12 ms
4,376 KB
testcase_03 AC 13 ms
4,376 KB
testcase_04 AC 12 ms
4,380 KB
testcase_05 AC 12 ms
4,376 KB
testcase_06 AC 12 ms
4,380 KB
testcase_07 AC 12 ms
4,380 KB
testcase_08 AC 13 ms
4,376 KB
testcase_09 AC 12 ms
4,380 KB
testcase_10 AC 12 ms
4,380 KB
testcase_11 AC 12 ms
4,376 KB
testcase_12 AC 12 ms
4,380 KB
testcase_13 AC 13 ms
4,376 KB
testcase_14 AC 14 ms
4,376 KB
testcase_15 AC 12 ms
4,376 KB
testcase_16 AC 13 ms
4,380 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 12 ms
4,376 KB
testcase_19 AC 12 ms
4,376 KB
testcase_20 AC 13 ms
4,376 KB
testcase_21 AC 13 ms
4,376 KB
testcase_22 AC 13 ms
4,376 KB
testcase_23 AC 12 ms
4,376 KB
testcase_24 AC 13 ms
4,380 KB
testcase_25 AC 12 ms
4,376 KB
testcase_26 AC 13 ms
4,380 KB
testcase_27 AC 12 ms
4,380 KB
testcase_28 AC 13 ms
4,376 KB
testcase_29 AC 12 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 50) Warning: Use the new 'sugar' module instead; future is deprecated [Deprecated]
/home/judge/data/code/Main.nim(1, 50) Warning: imported and not used: 'future' [UnusedImport]
/home/judge/data/code/Main.nim(1, 57) Warning: imported and not used: 'macros' [UnusedImport]
/home/judge/data/code/Main.nim(1, 26) Warning: imported and not used: 'strscans' [UnusedImport]
/home/judge/data/code/Main.nim(1, 35) Warning: imported and not used: 'algorithm' [UnusedImport]
/home/judge/data/code/Main.nim(1, 45) Warning: imported and not used: 'math' [UnusedImport]

ソースコード

diff #

import sequtils,strutils,strscans,algorithm,math,future,macros
template get*():string = stdin.readLine()
let N = get().parseInt()
if N == 1 :
  echo "NO"
  quit()
import osproc
let
  p = execProcess("factor " & $N )
  factors = p.strip().split()[1..^1].map(parseInt)
if factors.len <= 2:
  echo "NO"
else:
  echo "YES"
0