A kiss problem

PASSION = KISS \sqrt{ \text{PASSION} } = \text{KISS}

If each letter represents a different digit from 0 to 9, what is the value of KISS?


The answer is 2033.

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.

5 solutions

Discussions for this problem are now closed

Chew-Seong Cheong
Jul 12, 2014

I also used programming to solve it after trying to get it manually. But from preliminary calculations, it was found that K < 4 K<4 , else [ K I S S ] 2 [KISS]^{2} will have 8 8 digits. My program is just to find the cases of matching S S 's in P A S S I O N PASSION and K I S S KISS . The Python program is as follows:

for k in range(1,4):

for i in range(10):

    if i==k:

        continue

    for s in range(10):

        if s==k:

            continue

        if s==i:

            continue

        kiss = 1000*k+100*i+11*s

        square = kiss*kiss

        string = str(square)

        if string[2]==string[3]:

            if string[2]==str(s):

                print kiss,string

1422 2022084

2033 4133089

2877 8277129

3266 10666756

From the solutions (shown above after the program) from the program, the only solution for P A S S I O N PASSION is 4133089 4133089 when K I S S = 2033 KISS=\boxed{2033} .

I have came up with a analytical way of solving this. But it will be easier with the help of a spreadsheet. Let's start from the end. We know that the last digit of the product S × S S\times S is N N . Since S N S\ne N , therefore, S 0 , 1 , 5 , 6 S\ne 0,1,5,6 and S = 2 , 3 , 4 , 7 , 8 , 9 S=2,3,4,7,8,9 . Now move on to consider [ I S S ] 2 [ISS]^{2} , the product should have its last three digit be I O N ION . Let's do the calculation for I = 0...9 I=0...9 , and check if the third last digit of the product is I I as in P A S S I O N PASSION .

ISS ION

022 484 FALSE

122 14884 FALSE

322 103684 FALSE

422 178084 FALSE

522 272484 FALSE

622 386884 FALSE

722 521284 FALSE

822 675684 FALSE

922 850084 FALSE

033 1089 TRUE

133 17689 FALSE

233 54289 TRUE

433 187489 TRUE

533 284089 FALSE

633 400689 TRUE

733 537289 FALSE

833 693889 TRUE

933 870489 FALSE

044 1936 FALSE

144 20736 FALSE

244 59536 FALSE

344 118336 TRUE

544 295936 FALSE

644 414736 FALSE

744 553536 FALSE

844 712336 FALSE

944 891136 FALSE

077 5929 FALSE

177 31329 FALSE

277 76729 FALSE

377 142129 FALSE

477 227529 FALSE

577 332929 FALSE

677 458329 FALSE

877 769129 FALSE

977 954529 FALSE

088 7744 FALSE

188 35344 FALSE

288 82944 FALSE

388 150544 FALSE

488 238144 FALSE

588 345744 FALSE

688 473344 FALSE

788 620944 FALSE

988 976144 FALSE

099 9801 FALSE

199 39601 FALSE

299 89401 FALSE

399 159201 FALSE

499 249001 FALSE

599 358801 FALSE

699 488601 TRUE

799 638401 FALSE

899 808201 FALSE

It can be seen that there are six acceptable cases. The case of ( 344 , 118336 ) (344, 118336) is unacceptable because I = O = 3 I=O=3 is unacceptable.

ISS ION

033 1089 TRUE

233 54289 TRUE

433 187489 TRUE

633 400689 TRUE

833 693889 TRUE

344 118336 TRUE (FALSE)

699 488601 TRUE

Now check the final round of [ K I S S ] 2 [KISS]^{2} . We note that K < 4 K<4 , else [ K I S S ] 2 [KISS]^{2} has 8 8 digits.

KISS PASSION

1033 1067089 FALSE

2033 4133089 TRUE

3033 9199089 FALSE

1233 1520289 FALSE

2233 4986289 FALSE

3233 10452289 FALSE

1433 2053489 FALSE

2433 5919489 FALSE

3433 11785489 FALSE

1633 2666689 FALSE

2633 6932689 FALSE

3633 13198689 FALSE

1699 2886601 FALSE

2699 7284601 FALSE

3699 13682601 FALSE

We see that there is only one solution, that is K I S S = 2033 KISS=\boxed{2033} .

Chew-Seong Cheong - 6 years, 11 months ago

I did exactly same.

Hetal Patel - 6 years, 11 months ago
Nguyen Thanh Long
Jul 10, 2014

int find a number() { List<int> lst = new List<int>(); List<int> lst1 = new List<int>(); List<int> lst2 = new List<int>(); string str = "", str 1, str 2 = null; int tmp = 0; for (int i = 1; i <= 9; i++) { lst.Add(Convert.ToInt32(i.ToString().PadLeft(2, Convert.ToChar(i.ToString())))); } for (int k = 0; k < lst.Count; k++) { for (int i = 10; i <= 99; i++) { str = i.ToString(); str 1 = lst[k].ToString(); if (str 1.IndexOf(str.Substring(0, 1)) < 0 && str 1.IndexOf(str.Substring(1, 1)) < 0) { str 2 = str + str 1; tmp = (int)Math.Pow(Convert.ToInt32(str + str 1), 2); if (tmp.ToString().Length == 7 && tmp.ToString().Substring(2, 1) == tmp.ToString().Substring(3, 1) && tmp.ToString().Substring(4, 1) == str 2.ToString().Substring(1, 1) && tmp.ToString().Substring(1, 1) != tmp.ToString().Substring(2, 1)) { lst1.Add(tmp); lst2.Add(Convert.ToInt32(str + str 1)); } } } } return lst2[0]; }

Isn't the baby's expression cool?

Satvik Golechha - 6 years, 10 months ago

yes!! Very suprised.

Anuj Shikarkhane - 6 years, 10 months ago

This is a number theory problem, though, not computer science. So I insisted on doing this manually and surprisingly it wasn't much work, it is enough to check ( KISS 2 = PASSION ) (\text{KISS}^2=\text{PASSION}) using ( m o d 100 ) \pmod {100} and ( m o d 1000 ) \pmod{1000} and after founding a possibility of O, N, I, S, S \text{O, N, I, S, S} , going through the three possibilities of K \text{K} each time (we have 3162 KISS 1000 3162\ge\text{KISS}\ge 1000 ). This didn't take much time in my case. I still think it may be better to put this problem in the computer science section instead.

mathh mathh - 6 years, 11 months ago
Cf Paul
Sep 15, 2014

check different valid combinations until sqrt(passion)=kiss

 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
48
49
50
51
52
53
54
55
56
57
#include <stdio.h>

#include <math.h>
main()
{
   int x,y,z,b,c,d,e;
   int p,a,s,i,o,n,k;
   int passion,kiss;
   while(1)
   {
    for(x=0;x<10;x++)
    {
      p=x;
      for(y=0;y<10;y++)
        {
            if(y!=x)
            a=y;
            for(z=0;z<10;z++)
            {
                if((z!=y)&&(z!=x))
                s=z;
                for(b=0;b<10;b++)
                {
                    if((b!=y)&&(b!=x)&&(b!=z))
                    i=b;
                    for(c=0;c<10;c++)
                    {
                        if((c!=y)&&(c!=x)&&(c!=z)&&(c!=a))
                        o=c;
                        for(d=0;d<10;d++)
                        {
                            if((d!=y)&&(d!=x)&&(d!=z)&&(d!=a)&&(d!=b))
                            n=d;
                            for(e=0;e<10;e++)
                            {
                                if((e!=y)&&(e!=x)&&(e!=z)&&(e!=a)&&(e!=b)&&(e!=c))
                                k=e;
                                passion=p*1000000+a*100000+s*10000+s*1000+i*100+o*10+n;
                                kiss=k*1000+i*100+s*10+s;
                                kiss=kiss*kiss;
                                if(passion==kiss)
                                    {
                                        printf("p:%d\na:%d\ns:%d\ni:%d\no:%d\nn:%d\nk:%d\ni:%d",p,a,s,i,o,n,k,i);
                                        printf("\npassion:%d",passion);
                                        printf("\nkiss:%d%d%d%d",k,i,s,s);
                                        while(1);
                                    }

                            }
                        }
                    }
                }
            }
        }
    }
   }
} 

Tarun Singh
Feb 2, 2015
1
2
3
4
5
6
7
for i in range(1000000,9999999):
    a=str(math.sqrt(i))
    b=str(i)
    c=float(a)
    if c==int(c):
        if a[2]==a[3] and b[2]==b[3] and b[0]!= b[1] and b[1]!=b[2] and b[3]!=b[4] and b[0]!= b[2] and a[0]!=a[1] and a[1]==b[4]:
            print a

Nj Rafi
Sep 14, 2014

My Bruteforce solution. :D

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
int main()
{
        int k,i,s,p,a,o,n;   // for the value of the each letter
        int K,P;                //for the value of Passion & Kiss
        for(k=0;k<=9;k++)    // 7 loops for checking all the combinations possible
                for(i=0;i<=9;i++)
                        for(s=0;s<=9;s++)
                                for(p=0;p<=9;p++)
                                        for(a=0;a<=9;a++)
                                                for(o=0;o<=9;o++)
                                                        for(n=0;n<=9;n++)
        {
                if(k==i || i==s ||  s==p ||  p==a ||  a==o ||  o==n ) //as all the letters represent different numbers
                        continue;
                P= p*1000000 + a*100000 + s*10000 + s*1000 + i*100 + o *10 + n ; //value of passion
                K = k*1000 + i*100 + s *10 + s;            //value of kiss
                if(P==K*K)
                        printf("%d", K);
        }
        return 0;
}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...