#C11593. Check Corrupted Messages
Check Corrupted Messages
Check Corrupted Messages
You are given an integer t
representing the number of messages, followed by t
messages. A message is considered corrupted if it contains the digit \(7\), otherwise it is valid. Your task is to check each message and output whether it is VALID
or CORRUPTED
.
Example:
Input: 3 1234 5678 9876543210</p>Output: VALID CORRUPTED CORRUPTED
Please note that the digit \(7\) makes the message corrupted.
inputFormat
The first line contains an integer t
representing the number of messages. Each of the following t
lines contains a single message (a string of digits).
outputFormat
For each message, output a line containing either VALID
if the message does not contain the digit \(7\), or CORRUPTED
if it does.
3
1234
5678
9876543210
VALID
CORRUPTED
CORRUPTED
</p>