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

mathtest Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

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

mathtest.html

Problem Description

Mr Panda has just finished conducting his Math H3 course on Mental Arithmetic and has set a test for his S students. Given a number N, he wants his students to mentally calculate the Nth prime and write the answer out in words. Who would ever think that a Math course would test spelling? Obviously many of the students have forgotten their primary school math and Mr Panda has become so angry that he does not want to continue marking the test papers. He has asked you, as his assistant, to help him create a program to mark the rest of the questions in the test.

For simplicity's sake, the answers will exclude all punctuation marks including commas and hyphens. All "and"s will also be omitted so 999,999 will be written as "Nine hundred ninety nine thousand nine hundred ninety nine". Only the first letter of every answer will be capitalized.

Input

The first line of input consists of 2 integers: N and S.

The following S lines contain student i's answer on the ith line.

Output

On the ith line, output "Correct!" or "Wrong!" denoting the mark for the ith student.

Limits

0 < S ≤ 10 for all subtasks.

Subtask 1 (0%): Sample

Subtask 2 (50%): 0 < N ≤ 1000

Subtask 3 (50%): 0 < N ≤ 100000

Sample Input 1

3 3
Three
Five
Seven

Sample Output 1

Wrong!
Correct!
Wrong!

Tags

String Processing, Primes

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
15051s64MBMinimum
25051s64MBMinimum
3011s64MBMinimum

Judge Compile Command

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