17 条题解

  • 0
    @ 2025-9-12 23:00:13
    import Data.Bool (bool)
    isPrime n = n > 1 && all ((>0) . rem n) [2..floor (sqrt (fromIntegral n))]
    main = readLn >>= putStrLn . bool "no" "yes" . isPrime
    

    函数大手子来了

    信息

    ID
    25
    时间
    1000ms
    内存
    128MiB
    难度
    7
    标签
    递交数
    9049
    已通过
    2013
    上传者