- 1. Entrée, impression et numéros
- 2. Numéros entiers et flottants
- 3. Conditions: si-alors-autrement
- 4. Pour boucle avec plage
- 5. Cordes
- 6. Boucle en boucle
- 7. Listes
- 8. Fonctions et récursivité
- 9. Listes bidimensionnelles (tableaux)
- 10. Ensembles
- 11. Dictionnaires
- 12. JavaScript
- 13. HTML5 and CSS
- 14. Responsive Design with Bootstrap
- 15. jQuery
Ad place
School desks
Statement
A school decided to replace the desks in three classrooms. Each desk sits two students. Given the number of students in each class, print the smallest possible number of desks that can be purchased. The program should read three integers: the number of students in each of the three classes, a
, b
and c
respectively.
In the first test there are three groups. The first group has 20 students and thus needs 10 desks. The second group has 21 students, so they can get by with no fewer than 11 desks. 11 desks is also enough for the third group of 22 students. So we need 32 desks in total.
Advertising by Google, may be based on your interests
In all the problems input the data using input()
and print the result using print()
.
Statement
A school decided to replace the desks in three classrooms. Each desk sits two students. Given the number of students in each class, print the smallest possible number of desks that can be purchased. The program should read three integers: the number of students in each of the three classes, a
, b
and c
respectively.
In the first test there are three groups. The first group has 20 students and thus needs 10 desks. The second group has 21 students, so they can get by with no fewer than 11 desks. 11 desks is also enough for the third group of 22 students. So we need 32 desks in total.
Advertising by Google, may be based on your interests
In all the problems input the data using input()
and print the result using print()
.