Skip to content

Commit

Permalink
Merge branch 'master' of github.com:BryanCruz/maratonas-de-programacao
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanCruz committed Aug 29, 2018
2 parents 881e685 + 8b0e983 commit 682d860
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions sbc-2017/jogo-de-boca/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// https://www.urionlinejudge.com.br/judge/pt/problems/view/2667

#include<stdio.h>

int main(void){
char c[111];
scanf("%s", c);

int total = 0;
for(int i = 0; c[i] != '\0'; i++){
total += (int) (c[i] - '0');

}

printf("%d\n", total%3);
return 0;
}

0 comments on commit 682d860

Please sign in to comment.