All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Focusing Upon Couscous (Posted on 2008-11-10) Difficulty: 2 of 5
In the following statements, each of the capital letters in bold represent a different decimal digit from 1 to 9.

COUSCOUS is an 8-digit positive integer none of whose digits is composite and it is divisible without remainder by each of the primes CU, S, F, CFU and UF but not by the prime number CC.

What is the number represented by FOCUS?

See The Solution Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 3
list
   10     dim Taken(9)
   20     C=1:Taken(1)=1
   30     for U=3 to 7 step 4
   40       Taken(U)=1
   50     for S=2 to 7
   60     if Taken(S)=0 and prmdiv(S)=S then
   70     :Taken(S)=1
   80     :for F=2 to 7
   90       :if Taken(F)=0 and prmdiv(F)=F then
  100         :Taken(F)=1
  110         :Cfu=C*100+F*10+U
  120         :Uf=U*10+F
  130         :Cu=C*10+U
  140         :if prmdiv(Cfu)=Cfu and prmdiv(Uf)=Uf and prmdiv(Cu)=Cu then
  141   :for O=2 to 7
  142    :if Taken(O)=0 and prmdiv(O)=O then
  143       :Couscous=10001000+1000100*O+100010*U+10001*S
  144       :if Couscous@Cu=0 and Couscous@S=0 and Couscous@F=0 then
  145         :if Couscous@Cfu=0 and Couscous@Uf=0 and Couscous@11>0 then
  150           :print F;O;C;U;S
  156         :endif
  157       :endif
  158    :endif
  159   :next O
  160         :endif
  170         :Taken(F)=0
  180       :endif
  190     :next F
  200     :Taken(S)=0
  210     :endif
  220     next S
  230     Taken(U)=0
  240     next U
OK
run
 3  2  1  7  5
OK

So FOCUS is 32175.


  Posted by Charlie on 2008-11-10 17:53:18
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information