DWITE '07 R2 #1 - Not Quite Prime

View as PDF

Submit solution

Points: 5
Time limit: 2.0s
Memory limit: 64M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
DWITE Online Computer Programming Contest, November 2007, Problem 1

In mathematics, a semiprime number is a natural number that is the product of exactly two prime numbers. For example: 4, 6, 9, 10, 14, 15, 21, 22 are the first eight semiprime numbers. Given a set of numbers, one should be able to identify semiprime numbers contained in that set.

The input will contain five integers, one per line. 1 \le N \le 1000.

The output will contain five lines, stating if the supplied integers were "semiprime" or "not". Use the exact string output, all lower case, without quotes.

Sample Input

2
3
4
5
6

Sample Output

not
not
semiprime
not
semiprime

Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) Problem Resource: DWITE


Comments


  • -5
    rickyd  commented on March 9, 2019, 4:12 a.m.

    This comment is hidden due to too much negative feedback. Click here to view it.


    • 4
      kingW3  commented on March 9, 2019, 7:38 a.m. edited

      4 , 6, 9, 10, 14, 15, 21, 22 are the first eight semiprime numbers


      • 2
        rickyd  commented on March 10, 2019, 7:54 a.m.

        Thanks