Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

Notice Board

Per partecipare al corso di Fondamenti di programmazione 2023-24 loggatevi e attivatelo nella vostra pagina dei corsi preferiti. A quel punto il corso appare nel menù personale cliccando sul proprio avatar. Per i materiali degli anni precedenti seguite lo stesso metodo.

To join the Programming/Lab 2023-24 course, log-on and select it on the my courses page. It will appear on the personal menu of your avatar. For earlier years use the same method.

homework 1: number of digits

Chiaraa (2790 points)
4 15 25
in HW1 optional by (2.8k points)
Does the string inside the variable int_seq have to be composed by one digit numbers only or are multiple digits numbers also allowed? Does this also apply to the subtotal variable?
223 views

3 Answers

Cigo (5050 points)
3 6 48
by (5.1k points)
Yes, both subtotal and elements of the string can have more than 1 digit. There are some test cases with 3 digits number in the int_seq and 4 digit subtotal.
francesco.calzona (5210 points)
5 20 81
by (5.2k points)
They can both be longer than 1 digit; the only thing you are sure about is that they are both non - negative.
cristofer.valiante (1690 points)
3 8 21
by (1.7k points)
Yes the only thing that you're sure is that they're natural numbers.