Clean slate

The above shows a long division, where each box represents a single-digit integer between 0 and 9 inclusive. Fill the boxes in such a way that

  • Every digit 0-9 must occur at least once in the boxes.
  • The leading box (leftmost box) of the 5 sections (1.divisor, 2.dividend, 3.remainder, 4.quotient, 5.the section just below the dividend) must have a non-zero digit.

Given that there are 11 unique solutions, find the sum of remainders of all the 11 solutions.

Details and Assumptions :

  • As an explicit example, the long division below is one such solution, and the remainder in this case is 18.


This problem is posed by Pi Han G. .


The answer is 252.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Daniel Ploch
Feb 3, 2016

Used Python, runs in about half a second on my machine, if not less:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
    def digits(n):
      while n > 0:
        yield n % 10
        n /= 10

    rsum = 0

    for dividend in range(100, 1000):
      if len(set(digits(dividend))) < 2:
        continue
      for divisor in range(dividend/10 + 1, 100):
        quotient = dividend / divisor
        product = divisor * quotient
        remainder = dividend % divisor
        if quotient >= 10 or product < 100 or remainder < 10:
          continue
        d = set(digits(dividend))
        d |= set(digits(divisor))
        d |= set(digits(quotient))
        d |= set(digits(product))
        d |= set(digits(remainder))
        if len(d) == 10:
          rsum += remainder
          print dividend, '/', divisor, '=', quotient, 'R', remainder

    print rsum

Output:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
    190 / 78 = 2 R 34
    408 / 56 = 7 R 16
    410 / 56 = 7 R 18
    416 / 78 = 5 R 26
    502 / 69 = 7 R 21
    504 / 69 = 7 R 21
    510 / 69 = 7 R 27
    603 / 74 = 8 R 11
    605 / 74 = 8 R 13
    701 / 72 = 9 R 53
    750 / 92 = 8 R 14
    252 

Damn! This is awesome! +1

Prasun Biswas - 5 years, 4 months ago
Abdelhamid Saadi
May 4, 2016

This solution in python don't even use division

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
def solve():
    "Clean slate"
    result = 0
    for quotient in range(1, 10):
        for divisor in range(10, 100):
            section = quotient * divisor
            if section > 999 or section < 100:
                next
            for rest in range(10,divisor):
                dividend = section + rest
                if dividend > 999:
                    next
                alldigits = str(dividend)+str(divisor)+str(quotient)+str(rest)+str(section)
                if len(set(alldigits)) == 10:
                    print(dividend, '/', divisor,"=", quotient, 'R', rest, 'S', section)
                    result += rest
    return result

print("Solution = ", solve())            

Output

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
190 / 78 = 2 R 34 S 156
416 / 78 = 5 R 26 S 390
408 / 56 = 7 R 16 S 392
410 / 56 = 7 R 18 S 392
502 / 69 = 7 R 19 S 483
504 / 69 = 7 R 21 S 483
510 / 69 = 7 R 27 S 483
603 / 74 = 8 R 11 S 592
605 / 74 = 8 R 13 S 592
750 / 92 = 8 R 14 S 736
701 / 72 = 9 R 53 S 648
Solution =  252

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...