forked from potigol/beecrowd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bolas = para i de 1 ate 50 gere (i + 1) * (i + 1) div 2 - 1 fim | ||
t = leia_inteiro | ||
para i de 1 ate t faca | ||
n = leia_inteiro | ||
escreva bolas[n] | ||
fim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var dolares := leia_inteiro | ||
enquanto nao eof faca | ||
centavos = leia_inteiro | ||
s0 = dolares.texto | ||
s1 = se s0.tamanho > 3 entao s0.insira(s0.tamanho - 2 , ',') senao s0 fim | ||
s2 = se s1.tamanho > 7 entao s1.insira(s1.tamanho - 6 , ',') senao s1 fim | ||
s3 = se s2.tamanho > 11 entao s2.insira(s2.tamanho - 10, ',') senao s2 fim | ||
escreva "${s3}.{centavos formato "%02d"}" | ||
dolares := leia_inteiro | ||
fim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters