#CCBCHMUOI0000014. Tra mã vùng điện thoại (DDD)
Tra mã vùng điện thoại (DDD)
DDD
Source: beecrowd
Version: Phuoc Hung OJ Extended
Problem Statement
Look up a Brazilian telephone area code (DDD). The mappings are: 61 Brasilia; 71 Salvador; 11 Sao Paulo; 21 Rio de Janeiro; 32 Juiz de Fora; 19 Campinas; 27 Vitoria; 31 Belo Horizonte. For any other integer print the unregistered-code message.
Input
One line contains integer ddd, the area code to look up.
Output
Print the matching city name exactly as above, or DDD nao cadastrado if the code is not listed.
Subtasks
-
Subtask 1 (20 points): ddd belongs to {61,71,11,21}.
-
Subtask 2 (30 points): ddd belongs to the eight listed valid codes.
-
Subtask 3 (50 points): -1000 <= ddd <= 1000.
Examples
Example 1
Input
11
Output
Sao Paulo
Explanation
Code 11 maps to Sao Paulo.
Example 2
Input
99
Output
DDD nao cadastrado
Explanation
Code 99 is absent from the table, so print the unregistered message.