結果

問題 No.308 素数は通れません
ユーザー cielciel
提出日時 2015-12-03 04:21:26
言語 Crystal
(1.11.2)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 186 bytes
コンパイル時間 601 ms
コンパイル使用メモリ 161,320 KB
最終ジャッジ日時 2024-04-27 02:16:16
合計ジャッジ時間 1,506 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
Showing last frame. Use --error-trace for full trace.

In Main.cr:1:1

 1 | require "big_int"
     ^
Error: can't find file 'big_int'

If you're trying to require a shard:
- Did you remember to run `shards install`?
- Did you make sure you're running the compiler in the same directory as your shard.yml?

ソースコード

diff #

require "big_int"
h={4=>3,6=>5,12=>11,14=>13,18=>8,20=>19,21=>19,24=>23,25=>23}
n=BigInt.new(gets.not_nil!)
p n<26 ? h.has_key?(n) ? h[n] : 7 : n%8+`factor #{n-8}`.count(' ')==2 ? 14 : 8
0