From 17fa63817775704ab597085393e052af1742f3b3 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 30 Jun 2024 14:44:53 -0300 Subject: [PATCH] feat: add solution 1050 --- iniciante/gabrielduete/1050.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 iniciante/gabrielduete/1050.js diff --git a/iniciante/gabrielduete/1050.js b/iniciante/gabrielduete/1050.js new file mode 100644 index 0000000..0de23c1 --- /dev/null +++ b/iniciante/gabrielduete/1050.js @@ -0,0 +1,14 @@ +const DDD = parseInt(require('fs').readFileSync('/dev/stdin', 'utf8')) + +const locales = { + 61: 'Brasilia', + 71: 'Salvador', + 11: 'Sao Paulo', + 21: 'Rio de Janeiro', + 32: 'Juiz de Fora', + 19: 'Campinas', + 27: 'Vitoria', + 31: 'Belo Horizonte', +} + +locales[DDD] ? console.log(locales[DDD]) : console.log('DDD nao cadastrado')