Red and Blue = Purple?

R E D × B L U E Y E L L O W \Large \begin{array}{ccccc} & & & & & \color{#D61F06}{R} & \color{#D61F06}{E} &\color{#D61F06}{D} \\ \times & & & & \color{#3D99F6}{B} & \color{#3D99F6}{L} & \color{#3D99F6}{U} & \color{#3D99F6}{E} \\ \hline & & \color{gold}{Y} & \color{gold}{E} & \color{gold}{L} & \color{gold}{L} & \color{gold}{O} & \color{gold}{W} \\ \end {array}

The above expression represents a cryptarithm such that each letter represents a distinct single digit positive integer.

Calculate the 9-digit number B U Y R E D O W L \overline{BUYREDOWL} .

This problem was created by me


The answer is 679148523.

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

I call it "CryptografSuperWhile"

 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include<bits/stdc++.h>
using namespace std;

int main(){
int r,e,d,b,l,u,y,o,w;
long long shell,elf,sale,bill,rest;

r=1; e=1; d=1; b=1; l=1;
while(r<10)  {
    while(e<10){
        while(d<10){
            while(b<10){
                while(l<10){
                    for(u=1;u<10;u++){
if((r!=e) && (r!=d) && (r!=b) && (r!=l) && (r!=u) && (e!=d) && (e!=b) && 
   (e!=l) && (e!=u) && (d!=b) && (d!=l) && (d!=u) && (b!=l) && (b!=u) && (l!=u)){
                        shell=r*100+e*10+d;
                        elf=b*1000+l*100+u*10+e;
                        sale=shell*elf;
                        if(sale<999999){
                        for(y=1;y<10;y++){
                            for(o=1;o<10;o++){
                                for(w=1;w<10;w++){
if((y!=r) && (y!=e) && (y!=d) && (y!=b) && (y!=l) && (y!=u) && 
   (o!=r) && (o!=e) && (o!=d) && (o!=b) && (o!=l) && (o!=u) &&
   (w!=r) && (w!=e) && (w!=d) && (w!=b) && (w!=l) && (w!=u) && 
   (y!=o) && (y!=w) && (w!=o) && (e!=b) && (e!=l) && (e!=u) &&
   (r!=e) && (r!=d) && (r!=b) && (r!=l) && (r!=u) && (e!=d) && 
   (d!=b) && (d!=l) && (d!=u) && (b!=l) && (b!=u) && (l!=u)){
                            bill=y*100000+e*10000+l*1000+l*100+o*10+w;
                               if(sale==bill){
                                    rest=b*100000000+u*10000000+y*1000000+r*100000+e*10000+d*1000+o*100+w*10+l;
                                    cout<<rest<<endl; //OUTPUT=679148523
                                }
                                }
                                }
                            }
                        }   
                    }
                    }
                }
                l++;}
            b++;l=1;}
        d++;b=1;}
    e++;d=1;}
r++;e=1;}       
}

OUTPUT=679148523

Pranjal Jain
Nov 30, 2015
1
2
3
4
5
from itertools import permutations
for i in permutations('0123456789'):
    R,E,D,B,L,U,Y,O,W=tuple(i)[:9]
    if '0' not in R+B+Y and int(R+E+D)*int(B+L+U+E)==int(Y+E+L+L+O+W):
        print(B+U+Y+R+E+D+O+W+L)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...