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

lockcode Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

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

lockcode.html

In Bikini Bottom, there exists a special type of electronic lock. This type of lock requires the user to key in 4 prime numbers to unlock. However, the company that makes the lock has lost the program used to check whether the code is correct or not. As such, you are tasked with writing a program to check whether all 4 numbers are prime.

Input

4 numbers representing the 4 numbers the user keys into the electronic lock.
For 50% of the test cases, all 4 numbers are below 10000.
For 100% of the test cases, all 4 numbers are below 100000000.

Output

Output "Opening..." if all 4 numbers are prime.
Output "Wrong code" if not all 4 numbers are prime.

Sample Input 1

2 3 5 7

Sample Output 1

Opening...

Sample Input 2

1 3 5 7

Sample Output 2

Wrong code

Tags

Number Theory

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100100.25s32MBAverage
2020.25s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o lockcode -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.