Is divisible by ?

Created by Antoine Angot

Create a program to find and print all numbers between from 0 to 1000 (both included), that are divisible by 7 and whose digits sum are divisible by 3.

For instance, 1512 is divisible by 7 and the sum of all is digits is 9 and is divisible by 3.

Example

If the exercice were to make the same computation but in the range(1500, 1700), the solution should print:

$ ./solution.py
1512
1533
1554
1575
1596
1617
1638
1659
1680

There's no corrections yet, hit the `Submit` button to send your code to the correction bot.

Keyboard shortcuts:

  • Ctrl-Enter: Send your code to the correction bot.
  • Escape: Get back to the instructions tab.

See solutions