Advertisement
hackthecode

Математика за програмисти-домашно

Sep 7th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. Problem 1. Some Primes
  2. Find the 24th, 101st and 251st prime number.
  3.  
  4. Solution:
  5. 24th=89
  6. 101st=547
  7. 251st=1597
  8. =================================================
  9. Problem 2. Some Fibonacci Primes
  10. Check if the 24th, 101st and 251st prime numbers are part of the base Fibonacci number set. What is their position?
  11.  
  12. Solution:
  13. Prime position = number = Fibonacci number set position
  14. 24th=89=11
  15. 101st=547= is not part of the base Fibonacci number set
  16. 251st=1597=17
  17. =================================================
  18. Problem 3. Some Factorials
  19. Find 100!, 171! and 250! Give all digits.
  20.  
  21. Solution:
  22. 100! = 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
  23. 171! = 1241018070217667823424840524103103992616605577501693185388951803611996075221691752992751978120487585576464959501670387052809889858690710767331242032218484364310473577889968548278290754541561964852153468318044293239598173696899657235903947616152278558180061176365108428800000000000000000000000000000000000000000
  24. 250! = 3232856260909107732320814552024368470994843717673780666747942427112823747555111209488817915371028199450928507353189432926730931712808990822791030279071281921676527240189264733218041186261006832925365133678939089569935713530175040513178760077247933065402339006164825552248819436572586057399222641254832982204849137721776650641276858807153128978777672951913990844377478702589172973255150283241787320658188482062478582659808848825548800000000000000000000000000000000000000000000000000000000000000
  25. =================================================
  26. Problem 4. Calculate Hypotenuse
  27. You are given three right angled triangles. Find the length of their hypotenuses.
  28.  
  29. 1. Catheti: 3 and 4
  30. Solution:
  31. Hypotenuses = 5
  32. 2. Catheti: 10 and 12
  33. Solution:
  34. Hypotenuses = 15.6204993518
  35. 3. Catheti 100 and 250
  36. Solution:
  37. Hypotenuses = 269.258240357
  38. =================================================
  39. Problem 5. Numeral System Conversions
  40.  
  41. Convert 1234d to binary and hexadecimal numeral systems.
  42. Solution: 1234d = 10011010010b = 4D2hex
  43. Convert 1100101b to decimal and hexadecimal numeral systems.
  44. Solution: 1100101b = 101d = 65hex
  45. Convert ABChex to decimal and binary numeral systems.
  46. Solution: ABChex = 2748d = 0000101010111100b
  47. =================================================
  48. Problem 6. Least Common Multiple
  49. Find LCM(1234, 3456).
  50.  
  51. Solution:
  52. For the values: 1234, 3456
  53. The LCM is: 2132352
  54. =================================================
  55. Sources for all solutions:
  56. https://www.google.com
  57. http://www.calculatorsoup.com/
  58. http://www.numberempire.com/
  59. https://www.wolframalpha.com
  60. http://www.rapidtables.com/
  61. http://www.miniwebtool.com/hypotenuse-calculator/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement