Įkeliama užduotis…
This is a good way to practice divisibility and careful number scanning. Write a function sum_multiples_3_5 that finds the sum of all natural numbers less than n that are divisible by 3 or 5. If a number is divisible by both, count it only once. Return the final sum.
102316601000233168def sum_multiples_3_5(n: int) -> int:
Prisijunkite, kad matytumėte pateikimų istoriją
PrisijungtiPrisijunkite, kad naudotumėte DI mentorių
Prisijungti102316601000233168001049543