{"id":125044,"date":"2019-03-25T12:07:54","date_gmt":"2019-03-25T15:07:54","guid":{"rendered":"http:\/\/clubes.obmep.org.br\/blog\/?page_id=125044"},"modified":"2023-05-22T06:41:46","modified_gmt":"2023-05-22T09:41:46","slug":"problemao-pensando-como-um-computador","status":"publish","type":"page","link":"https:\/\/clubes.obmep.org.br\/blog\/problemao-pensando-como-um-computador\/","title":{"rendered":".Problem\u00e3o: Pensando como um computador"},"content":{"rendered":"<p style=\"margin:10px\">\n<div class=\"g1\" style=\"line-height:25px;\">\n<p class=\"tit\"style=\"line-height:20px; margin-bottom: 10px;\">Problema<br \/>\n<span style=\"font-size:12px;color:#800000\"> (Indicado a partir do 7\u00ba ano do E. F.)<\/span><\/p>\n<hr style=\"height:1px; width:100%;background-color:#800000; margin-top: 10px; margin-bottom: 20px;border: 0 none\"\/>\n<p>Um programa de computador executa a seguinte rotina (algoritmo):<br \/>\n<strong>1.<\/strong> Inicie com os valores [tex]X[\/tex] e [tex]Y[\/tex].<br \/>\n<strong>2.<\/strong> Considere [tex]x[\/tex] como o  quadrado de [tex]X [\/tex]  e [tex]y[\/tex] como [tex]Y[\/tex] subtra\u00eddo do n\u00famero [tex]3[\/tex].<br \/>\n<strong>3.<\/strong> Some os valores [tex]x[\/tex] e [tex] y[\/tex].<br \/>\n<strong>4.<\/strong> Se a soma de [tex]x[\/tex] com [tex]y[\/tex] for menor que [tex]50[\/tex],  considere [tex]X[\/tex] como [tex]x[\/tex], [tex]Y[\/tex] como [tex]y[\/tex] e retorne para a <strong>Instru\u00e7\u00e3o 2<\/strong>, refazendo o algoritmo a partir da\u00ed; caso contr\u00e1rio, v\u00e1 para a <strong>Instru\u00e7\u00e3o 5<\/strong>.<br \/>\n<strong>5.<\/strong> D\u00ea o resultado de [tex]x [\/tex] e [tex]y[\/tex].<br \/>\n<strong>6.<\/strong> Pare.<\/p>\n<p>Considerando [tex]X=2 [\/tex] e [tex]Y=4[\/tex], determine o resultado dado pelo computador ao final da rotina.<\/p>\n<p style=\"margin:20px\">\n<\/div>\n<p style=\"margin:30px\">\n<div class=\"g1\" style=\"line-height:27px;\">\n<p class=\"tit\"style=\"line-height:30px; margin-bottom: 10px;\">Solu\u00e7\u00e3o<\/p>\n<hr style=\"height:1px; width:100%;background-color:#800000; margin-top: 10px; margin-bottom: 20px;border: 0 none\"\/>\n<p>Vamos realizar os passos a serem seguidos pelo programa, considerando [tex]X=2[\/tex] e [tex]Y=4[\/tex]:<br \/>\n<strong>Passo 1:<\/strong> [tex]\\boxed{X=2}[\/tex] e [tex]\\boxed{Y=4}[\/tex].<br \/>\n<strong>Passo 2:<\/strong> [tex]x=2^2=\\boxed{4}[\/tex] e [tex]y=4-3=\\boxed{1}[\/tex].<br \/>\n<strong>Passo 3:<\/strong> [tex]x+y=4+1=\\boxed{5}[\/tex].<br \/>\n<strong>Passo 4:<\/strong> Como [tex]x+y\\lt 50[\/tex], devemos considerar agora [tex]X=x=\\boxed{4}[\/tex] e [tex]Y=y=\\boxed{1}[\/tex] e retornar ao <strong>Passo 2<\/strong>.<br \/>\n<span style=\"padding-left:70px;\"><\/span><strong>Passo 2:<\/strong> [tex]x=4^2=\\boxed{16}[\/tex] e [tex]y=1-3=\\boxed{-2}[\/tex].<br \/>\n<span style=\"padding-left:70px;\"><\/span><strong>Passo 3:<\/strong> [tex]x+y=16-2=\\boxed{14}[\/tex].<br \/>\n<span style=\"padding-left:70px;\"><\/span><strong>Passo 4:<\/strong> Como [tex]x+y\\lt 50[\/tex], devemos considerar agora [tex]X=x=\\boxed{16}[\/tex] e [tex]Y=y=\\boxed{-2}[\/tex] e retornar ao <strong>Passo 2<\/strong>.<br \/>\n<span style=\"padding-left:140px;\"><\/span><strong>Passo 2:<\/strong> [tex]x=16^2=\\boxed{256}[\/tex] e [tex]y=-2-3=\\boxed{-5}[\/tex].<br \/>\n<span style=\"padding-left:140px;\"><\/span><strong>Passo 3:<\/strong> [tex]x+y=256-5=\\boxed{251}[\/tex].<br \/>\n<span style=\"padding-left:140px;\"><\/span><strong>Passo 4:<\/strong> Como [tex]x+y\\ge 50[\/tex], podemos ir ao passo 5.<br \/>\n<span style=\"padding-left:140px;\"><\/span><strong>Passo 5:<\/strong> [tex]x=\\boxed{256}[\/tex] e [tex]y=\\boxed{-5}[\/tex].<br \/>\n<span style=\"padding-left:140px;\"><\/span><strong>Passo 6:<\/strong> Pare.<\/p>\n<p>Assim, o resultado final fornecido pelo computador ser\u00e1 [tex] \\, \\fcolorbox{black}{#eee0e5}{$ \\, x=256$} \\, [\/tex] e [tex] \\, \\fcolorbox{black}{#eee0e5}{$ \\, y=-5$} \\, .[\/tex]<\/p>\n<hr style=\"height:1px; width:100%;background-color:#800000; margin-top: 10px; margin-bottom: 15px;border: 0 none\"\/>\n<p class=\"g2\" style=\"line-height:20px;\">Solu\u00e7\u00e3o elaborada pelos <strong>Moderadores do Blog<\/strong>.<\/p>\n<\/div>\n<p style=\"margin:10px\">\n","protected":false},"excerpt":{"rendered":"<p>Problema (Indicado a partir do 7\u00ba ano do E. F.) Um programa de computador executa a seguinte rotina (algoritmo): 1. Inicie com os valores [tex]X[\/tex] e [tex]Y[\/tex]. 2. Considere [tex]x[\/tex] como o quadrado de [tex]X [\/tex] e [tex]y[\/tex] como [tex]Y[\/tex] subtra\u00eddo do n\u00famero [tex]3[\/tex]. 3. Some os valores [tex]x[\/tex] e [tex] y[\/tex]. 4. Se a &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/clubes.obmep.org.br\/blog\/problemao-pensando-como-um-computador\/\">Continue lendo<\/a><\/p>\n","protected":false},"author":620,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template-onecolumn.php","meta":{"footnotes":""},"class_list":["post-125044","page","type-page","status-publish","hentry","nodate","item-wrap"],"_links":{"self":[{"href":"https:\/\/clubes.obmep.org.br\/blog\/wp-json\/wp\/v2\/pages\/125044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clubes.obmep.org.br\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/clubes.obmep.org.br\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/clubes.obmep.org.br\/blog\/wp-json\/wp\/v2\/users\/620"}],"replies":[{"embeddable":true,"href":"https:\/\/clubes.obmep.org.br\/blog\/wp-json\/wp\/v2\/comments?post=125044"}],"version-history":[{"count":13,"href":"https:\/\/clubes.obmep.org.br\/blog\/wp-json\/wp\/v2\/pages\/125044\/revisions"}],"predecessor-version":[{"id":191506,"href":"https:\/\/clubes.obmep.org.br\/blog\/wp-json\/wp\/v2\/pages\/125044\/revisions\/191506"}],"wp:attachment":[{"href":"https:\/\/clubes.obmep.org.br\/blog\/wp-json\/wp\/v2\/media?parent=125044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}