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

hexadecimal Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

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

hexadecimal.html

For those of you who know about RGB colour model, colours in the model are represented in hexadecimals. Examples are #FF0000 (red), #00FF00 (green) and #0000FF (blue)

Your Task:

Write a program that takes in a 6 digit hexadecimal number and determine whether it is a valid hexadecimal number or not.

Hexadecimals only have 0-9 and A-F as its digits.

The letters will all be in uppercase.

Input

The first line of input would be n, the number of hexadecimal numbers that follow. n hexadecimal numbers would follow, one on each line. 0 < n < 21

Output

Output "Hexadecimal" if the number is a valid hexadecimal number and "Not Hexadecimal" if it is not.

Sample Input

5
#FF0000
#00FF00
#0000FF
#ABCDEF
#FGHIJK

Sample Output

Hexadecimal
Hexadecimal
Hexadecimal
Hexadecimal
Not Hexadecimal

Tags

String Processing

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
110051s32MBAverage
2011s32MBAverage

Judge Compile Command

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