結果

問題 No.8023 素数判定するだけ
ユーザー くれちーくれちー
提出日時 2017-03-31 22:53:58
言語 Haskell
(9.8.2)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 1,334 bytes
コンパイル時間 10,063 ms
コンパイル使用メモリ 188,048 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-04 20:00:11
合計ジャッジ時間 12,624 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,816 KB
testcase_02 AC 2 ms
6,820 KB
testcase_03 AC 2 ms
6,820 KB
testcase_04 AC 2 ms
6,816 KB
testcase_05 AC 2 ms
6,816 KB
testcase_06 AC 2 ms
6,820 KB
testcase_07 AC 3 ms
6,820 KB
testcase_08 AC 2 ms
6,820 KB
testcase_09 AC 2 ms
6,816 KB
testcase_10 AC 2 ms
6,816 KB
testcase_11 AC 2 ms
6,816 KB
testcase_12 AC 2 ms
6,816 KB
testcase_13 AC 2 ms
6,820 KB
testcase_14 AC 2 ms
6,816 KB
testcase_15 AC 2 ms
6,816 KB
testcase_16 AC 2 ms
6,820 KB
testcase_17 AC 2 ms
6,816 KB
testcase_18 AC 2 ms
6,820 KB
testcase_19 AC 2 ms
6,816 KB
testcase_20 AC 2 ms
6,816 KB
testcase_21 AC 2 ms
6,816 KB
testcase_22 AC 2 ms
6,816 KB
testcase_23 AC 2 ms
6,816 KB
testcase_24 AC 2 ms
6,816 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

table = ["P","Q","S","U","OO","OQ","OU","OW","PQ","PW","QO","QU","RO","RQ","RU","SQ","SW","TO","TU","UO","UQ","UW","VQ","VW","WU","ONO","ONQ","ONU","ONW","OOQ","OPU","OQO","OQU","OQW","ORW","OSO","OSU","OTQ","OTU","OUQ","OUW","OVO","OWO","OWQ","OWU","OWW","POO","PPQ","PPU","PPW","PQQ","PQW","PRO","PSO","PSU","PTQ","PTW","PUO","PUU","PVO","PVQ","PWQ","QNU","QOO","QOQ","QOU","QQO","QQU","QRU","QRW","QSQ","QSW","QTU","QUQ","QUW","QVQ","QVW","QWU","RNO","RNW","ROW","RPO","RQO","RQQ","RQW","RRQ","RRW","RSU","RTO","RTQ","RTU","RUW","RVU","RWO","RWW","SNQ","SNW","SPO","SPQ","SRO","SRU","SSU","STQ","STW","SUO","SUU","SVU","SWQ","SWW","TNO","TNU","TOQ","TOU","TOW","TQO","TRO","TRQ","TRU","TSQ","TSW","TTO","TUQ","TUU","TVQ","TWO","UNO","UNW","UOW","UPU","UQQ","UQW","URQ","USO","USU","UTO","UTW","UUQ","UVU","UWU","VNW","VOO","VPO","VPQ","VPU","VPW","VQW","VSQ","VSU","VSW","VTQ","VUU","VVO","VVQ","VVU","WNU","WOO","WOW","WPW","WQU","WRO","WRU","WSQ","WTU","WUO","WUU","WVQ","WWO","WWU"]

table' :: [Int]
table' = map (read . map (pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred)) table

solve n = if n `elem` table' then "YES" else "NO"

main = putStrLn . solve =<< readLn
0