← Questions

Sum of numbers up to n divisible by 3, 5 or 7

0
AbridgeCodingLast asked Sep 2026

A coding interview question asked in Abridge's coding round, last asked Sep 2026. It tests math and inclusion-exclusion.

Given a positive integer n, return the sum of every integer from 1 to n, both ends included, that is divisible by at least one of 3, 5 and 7. A number divisible by more than one of them, such as 15 or 21, is added once.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Abridge · Coding · Last asked Sep 2026Coding tied to the product, not puzzles; mobile candidates had a one-hour hands-on build

What it tests

math · inclusion-exclusion

Your code and the AI tutor open when you unlock this question.