Skip to content

Commit

Permalink
Create 2790.poti (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
lrlucena authored Oct 14, 2024
1 parent 0e1c595 commit d4f867a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/2700/2790.poti
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
n = leia_inteiro
s = leia_texto

var l1, l2, l3, l4, l5, l6 := 0
para c em s faca
escolha c
caso '1' => l1 := l1 + 1
caso '2' => l2 := l2 + 1
caso '3' => l3 := l3 + 1
caso '4' => l4 := l4 + 1
caso '5' => l5 := l5 + 1
caso '6' => l6 := l6 + 1
caso _ =>
fim
fim

mov = [l1, l2, l3, l4, l5, l6]
m = para lado de 1 ate 6 gere
n - mov[lado] + mov[7 - lado]
fim
escreva m.ordene.cabeça

0 comments on commit d4f867a

Please sign in to comment.