oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

primalitytesting Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

primalitytesting.html

Given a number 0 < n < 100, and on the following line n numbers 0 < D1, D2, D3, ..., Dn < 1,000, for each Di in sequence output "Di is a prime number." if Di is prime and "Di is a composite number." if Di is not prime.

Sample Input 1

2
1 3

Sample Output 1

1 is a composite number.
3 is a prime number.

Sample Input 2

3
2 5 6

Sample Output 2

2 is a prime number.
5 is a prime number.
6 is a composite number.

Tags

Number Theory

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
110051s32MBAverage
2021s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o primalitytesting -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.