File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Solve This

 
Rakesh Joshi
Ranch Hand
Posts: 218
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you make a target number 37 by using five 5s? You can use any math operator as you want. There are at least two different ways.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
((5+5)/5)^5 + 5
((5/5)/.5)^5 + 5
(5*.5 + 5)*5 -.5
5/(5 * .5^5) + 5

(where x^y = Math.pow(x, y))

Various others...
 
Stuart Ash
Ranch Hand
Posts: 637
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jim, did you solve it yourself? If yes, give us your train of thought, can you?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved it myself in the sense that I wrote the program myself. Actually it was written for an earlier problem; I just modified it slightly.

By the way, all these posts saying "solve this" and "now solve this" could really use some better titles. The existing ones are pretty much useless.
 
Rakesh Joshi
Ranch Hand
Posts: 218
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jim, thanks for ur suggestion.
[ March 26, 2006: Message edited by: Rakesh Joshi ]
 
Ali Hassaan
Ranch Hand
Posts: 103
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
((5^5/5^5) + (5^5/5^5))^5 + 5
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic